Open-source tracing
Every request, followed to the slow span.
Tracewire is a CLI and a dashboard that stitches OpenTelemetry spans into one waterfall, then points at the span that cost you the most time.
brew install tracewire
- api-gatewayPOST /checkout412
- authverify-token18
- cartget-cart45
- pricingquote65
- postgresSELECT inventory227
- paymentscharge34
- db.statement
- SELECT * FROM inventory WHERE sku = ANY($1)
- db.rows
- 1,284
- hint
- no index on inventory(sku)
- api-gatewayGET /search188
- authverify-token11
- searchquery159
- redisGET cache3
- opensearch_search138
- rankerscore10
- db.statement
- match: title^2, body · size 50
- cache
- miss
- hint
- cache key ignores the locale
- api-gatewayPOST /login96
- authlogin88
- postgresSELECT users6
- authbcrypt.compare68
- redisSET session3
- bcrypt.cost
- 13
- thread
- event loop
- hint
- hashing blocks the request thread
Install
Three commands from zero to a trace.
Install the binary, point your services at the collector it starts, then ask for the slow requests. The collector speaks OTLP, so the SDKs you already use keep working.
- macOS, Linux and Docker
- Traces stay on your machine
- One YAML file, checked into the repo
# 1. install the binary
brew install tracewire
# 2. start the collector and the dashboard
tracewire up --service checkout-api
collector listening on :4317 (OTLP gRPC)
dashboard open localhost:7070
service: checkout-api
collector:
endpoint: localhost:4317
sample:
rate: 0.25
always: [errors, slower_than_300ms]
retain: 7d
tracewire query 'service = "checkout-api" and duration > 300ms' --since 1h
TRACE ROUTE DURATION SLOWEST SPAN
7f3a9c2e POST /checkout 412 ms postgres SELECT inventory
2be81f04 POST /checkout 389 ms postgres SELECT inventory
91c0d7aa POST /checkout 331 ms payments charge
Example output, made-up data
How it works
From loose spans to the line that slowed you down.
One trace, four views. Scroll and the waterfall on the right changes with each step.
-
Instrument
Keep the OpenTelemetry SDK you have, or let the CLI add auto-instrumentation for Node, Go and Python. Spans start arriving the moment a request runs.
- OTLP over gRPC and HTTP
- No code change for the auto path
-
Stitch
Spans from every service join on their trace and parent ids. Six fragments from four processes become one request you can read top to bottom.
- W3C trace context
- Clock skew corrected per host
-
Find
Tracewire walks the critical path and dims everything that ran in parallel. What is left is the chain of spans the user actually waited on.
- Critical path, not just the longest bar
- Attributes inline
-
Compare
Lay this trace over the same route before your last deploy. The span that grew is marked with the commit that shipped it.
- Diff by route and deploy
- Links back to the commit
- api-gateway POST /checkout
- auth verify-token
- cart get-cart
- pricing quote
- postgres SELECT inventory227 ms+182 ms
- payments charge