# How Sypnia uses it

> Every Sypnia product runs on Sypnia Run, and Telemetry, the pilot, shows how.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://run.docs.sypnia.com/start/how-sypnia-uses-it/

For agents: Dogfooding: Telemetry (the pilot, built on Sypnia end to end) is deployed by Run from its repository in Sypnia Git (organization sypnia), project telemetry in Sypnia's organization, paid with its credits. Apps: telemetry-site (static, telemetry.sypnia.com), telemetry-docs (static, telemetry.docs.sypnia.com), telemetry-console (server-rendered, telemetry.app.sypnia.com), telemetry-engine (Rust; one service per area of its map: ingest behind telemetry.ingest.sypnia.com, api behind telemetry.api.sypnia.com, problems, alerts, uptime). Its cases: ingest-batch (external), open-problem and analyze-problem (event), send-alert (event), send-daily-summary (scheduled, each organization's morning), check-uptime (scheduled every minute), roll-up-hour (scheduled) through cases.handlers; outcomes such as problems.open-problem.ProblemOpened.v1 go through the outbox to analyze-problem and send-alert. Every pull request gets a preview; production waits for a person in App; automatic rollback on Telemetry's own release markers. Names in Sypnia Domains, secrets in Run, files in Files, sign-in with Data. Rest of the suite: every product's site and console runs on Run, and their cases run as Run services.

Telemetry is the pilot of the Sypnia suite: it is built on Sypnia from end to end and uses every Sypnia product. This is how it uses Sypnia Run.

## How Telemetry runs on Run

Telemetry's code lives in Sypnia Git, in the organization `sypnia`, and its Run project is `telemetry`, paid with the credits of Sypnia's organization like any customer's.

| App                 | Kind                                     | Address                                                   |
| ------------------- | ---------------------------------------- | --------------------------------------------------------- |
| `telemetry-site`    | static site                              | `telemetry.sypnia.com`                                    |
| `telemetry-docs`    | static site                              | `telemetry.docs.sypnia.com`                               |
| `telemetry-console` | server-rendered app                      | `telemetry.app.sypnia.com`                                |
| `telemetry-engine`  | one service per area of its map, in Rust | `telemetry.ingest.sypnia.com`, `telemetry.api.sypnia.com` |

## Its use cases, run by Run

Telemetry's map in Cases says how each of its cases starts, and Run creates the rest ([Use cases](https://run.docs.sypnia.com/cases)):

| Case                 | Starts                                                     | What Run creates                                                              |
| -------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `ingest-batch`       | `external`: an SDK sends a batch                           | the ingest endpoint, in the `ingest` service                                  |
| `roll-up-hour`       | `scheduled`: every minute                                  | a schedule, calling the engine through `cases.handlers`                       |
| `check-uptime`       | `scheduled`: every minute                                  | a schedule in the `uptime` service                                            |
| `open-problem`       | `event`: `ingest.ingest-batch.BatchStored.v1`              | a subscription with its own queue                                             |
| `analyze-problem`    | `event`: `problems.open-problem.ProblemOpened.v1`          | a subscription; it calls [Sypnia AI](https://ai.docs.sypnia.com/)             |
| `send-alert`         | `event`: `problems.open-problem.ProblemOpened.v1`          | a subscription; it sends through [Sypnia Mail](https://mail.docs.sypnia.com/) |
| `send-daily-summary` | `scheduled`: each organization's morning, in its time zone | a schedule                                                                    |

`ProblemOpened` is saved in the outbox in the same transaction as the problem, so the analysis and the alert can never be lost or sent about a problem that does not exist. If the alert's listener fails, its dead letters show on `send-alert` in the map, and the analysis carries on.

## Deploys

- **A preview for every pull request**, with its address in the pull request and the use-case diff next to the code diff.
- **Production waits for a person.** An agent can deploy a preview; releasing to production is approved in [Sypnia App](https://app.docs.sypnia.com/).
- **Automatic rollback** watches Telemetry's own release markers: if errors rise after a release, Run goes back to the previous deploy.
- **The names** are Sypnia Domains connections, with their certificates; secrets live in Run, files in [Sypnia Files](https://files.docs.sypnia.com/), and sign-in comes from [Sypnia Data](https://data.docs.sypnia.com/).

## The rest of the suite

| Product                                                                                                                                                                                                                                          | What runs on Run                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| [Cases](https://cases.docs.sypnia.com/), [Git](https://git.docs.sypnia.com/), [Data](https://data.docs.sypnia.com/), [Files](https://files.docs.sypnia.com/), [Mail](https://mail.docs.sypnia.com/), [Domains](https://domains.docs.sypnia.com/) | their sites, docs, consoles and APIs, and their cases as services per area |
| [Agent](https://agent.docs.sypnia.com/), [AI](https://ai.docs.sypnia.com/), [App](https://app.docs.sypnia.com/)                                                                                                                                  | their servers and the streaming answers                                    |
| [Design](https://design.docs.sypnia.com/), [Learn](https://learn.docs.sypnia.com/), [Skills](https://skills.docs.sypnia.com/)                                                                                                                    | their sites, consoles and registries                                       |
| sypnia.com                                                                                                                                                                                                                                       | the suite's own site                                                       |

## What it proves

Telemetry's ingest is the busiest endpoint Sypnia has. If a deploy, a schedule or an event on Run is slow, late or lost, Telemetry is the first to feel it, in production, every day, and its own traces say where.
