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
trace 7f3a9c2e412 ms · 6 spans
  1. api-gatewayPOST /checkout412
  2. authverify-token18
  3. cartget-cart45
  4. pricingquote65
  5. postgresSELECT inventory227
  6. paymentscharge34
db.statement
SELECT * FROM inventory WHERE sku = ANY($1)
db.rows
1,284
hint
no index on inventory(sku)
Example trace, made-up data
OpenTelemetry native MIT licensed Runs on your laptop

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

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.

  1. 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
  2. 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
  3. 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
  4. 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
POST /checkout trace 7f3a9c2e
  1. api-gateway POST /checkout
  2. auth verify-token
  3. cart get-cart
  4. pricing quote
  5. postgres SELECT inventory227 ms+182 ms
  6. payments charge
6 spans4 services, no parent links yet
412 msone request, read top to bottom
227 mspostgres SELECT inventory, 55% of the wait
+182 mssince deploy a41c9e2 added the inventory query
Example trace, made-up data