How it works

How Spanrow finds the slow line.

How Spanrow finds the slow line.

What happens between installing the agent and fixing a slow endpoint. Fifteen minutes to read, one afternoon to try.

What happens between installing the agent and fixing a slow endpoint. Fifteen minutes to read, one afternoon to try.

Step 1

Install the agent

Spanrow ships as a small package for each language. It wraps your web framework, database drivers and HTTP client, so you don’t write tracing code by hand.

npm install @spanrow/node

export SPANROW_KEY=sk_live_7f3a91c2

node -r @spanrow/node/auto server.js

Already on OpenTelemetry? Point your exporter at collector.spanrow.io and skip this step.

Step 2

Send traces from every service

Each service that handles part of a request adds its own spans. Spanrow joins them into one trace using the header your services already pass along.

Queues and background jobs work the same way: the job’s spans hang under the request that enqueued it.

traceparent: 00-7f3a91c2e04b9d10-5c1e02a4-01

Step 3

Read a trace

A trace is a waterfall: one row per span, on a shared clock. Long bars are slow. Bars that sit end to end are waiting on each other.

Spanrow marks the span that cost the most time and explains why, with the file and line that did the work.

POST /v2/checkout

POST /v2/checkout

auth.verify_session

auth.verify_session

pricing.quote

pricing.quote

payments.authorize

payments.authorize

INSERT orders

INSERT orders

Fig. 3 The slow span is the longest bar that others wait on

Fig. 3 The slow span is the longest bar that others wait on

Step 4

Set a latency target

Pick a route and the percentile you care about. Spanrow draws the target on the chart and tracks how much of this month’s budget is left.

route: POST /v2/checkout

p95: 500ms

window: 30d

Step 5

Get told when it slips

When a route misses its target for an hour, Spanrow sends one message with the slowest trace from that hour attached. No alert storms and no dashboards to watch.

Alerts go to Slack, PagerDuty, email or any webhook.

Try it on your own traffic.

Create a free website with Framer, the website builder loved by startups, designers and agencies.