Engineering4 min read
Observability without agents
SRE
Most observability tools ask you to install an agent, wrap your code in an SDK and pay per gigabyte ingested. We wanted something that just works the moment you deploy.
That led to a simple question: how much can we tell you about your app without adding anything to it? Quite a lot, it turns out, though not everything. This post covers how it works and where it stops.
The trouble with agents
Agents and SDKs are powerful because they run inside your app. That's also their weakness. They add to startup time, use memory and need updating like any other dependency. If you forget to add one to a new service, you may not find out until you need its data.
Pricing by volume creates another problem. When each log line adds to the bill, teams start removing data to save money. The details they remove are often the ones they need in the next incident.
Collection at the edge
Because every request already passes through Shipr's edge network, we can measure latency, status codes and cache behaviour without touching your code. Timing starts when a request reaches us and ends when we've sent the last byte of the response.
For each request, the edge records a small, structured event:
{
"route": "/api/checkout",
"region": "bom1",
"deploy": "v45",
"status": 200,
"cache": "miss",
"edge_ms": 6,
"origin_ms": 142
}Separating edge time from origin time answers the first question in most investigations: is the delay in the network or in the app? Here, the app took 142 of the 148 milliseconds, so that's where to look.
We record route patterns rather than full URLs, so /users/123 and /users/456 both count towards /users/[id]. That keeps the dashboard readable and keeps IDs in the path out of your metrics. These events don't include request or response bodies.
Getting percentiles right
Averages hide slow requests. If 99 requests take 50 milliseconds and one takes five seconds, the average is about 100 milliseconds. That number doesn't describe anybody's experience. Percentiles give you a much clearer picture: p50 shows a typical request, while p95 and p99 show how slow things get for the unluckiest users.
They're also easy to get wrong. You can't average the p99 from each of 18 regions and call the result a global p99. A quiet region would count as much as a busy one, and the answer could be far from the truth.
Instead, each region sends a compact summary of how its response times are spread out. We combine those summaries first and calculate percentiles afterwards. The result is a close estimate that gives each region the right weight, and we don't have to keep every individual timing.
Connecting a spike to its cause
A chart can tell you that latency went up at 2:14pm. What you really want to know is what changed. Since Shipr also handles your deploys, each event already includes the version that served it. We can mark deploys on the chart and compare the same route before and after each one.
This is especially helpful during a gradual rollout, when two versions are serving traffic at the same time. A small group of slow requests can disappear into the overall numbers. Compare the versions side by side and the difference is much easier to see.
The most useful thing on a latency chart is often the line that shows when you deployed.
What you get
- p50, p95 and p99 latency by route and region.
- Error rates with the deploy that introduced them.
- Build health and cache hit rates over time.
What the edge can't see
The edge sees a request go into your app and a response come out. It can't see what happens in between. It can tell you that checkout slowed down after v45, but not which database query is responsible. It also can't see background jobs that never pass through the edge, or errors that your app catches before returning a successful response.
For those, you still need logs or tracing inside your app. We think of edge data as the place to begin: it covers every route from the first deploy and tells you where to look. You can then add detailed tracing to the few places that need it, instead of adding it everywhere just in case.
Pricing
Latency and error dashboards are included on every plan, with no charge based on data volume. Logs are kept for 1 day on Hobby, 30 days on Pro and 13 months on Team. Email alerts are available on Pro, while Team adds Slack and PagerDuty.
There's nothing to install. Deploy your project, send it some traffic and open the Observability tab.