SpanSlice

Cut your trace volume without losing what matters

SpanSlice defines rules to decide which traces and spans should reach your observability vendor.

Send a fraction of the volume, and keep every error, every slow request and every other trace you would want when investigating an incident.

  1. GET /checkoutKeep traces with an errorsent
  2. auth.verifyDrop sync spans under 5msnot sent
  3. cart.loadsent
  4. cache.getDrop sync spans under 5msnot sent
  5. db.query cartssent
  6. payments.chargesent
  7. POST api.stripe.comerrorsent
  8. db.insert orderssent
  9. queue.publishDrop sync spans under 5msnot sent
Sent to your vendorNot sent
Spans sent
15
Spans not sent
204
Volume sent
7%

Define rules for what to keep

Set up rules that match the span name, attributes, duration, error status, etc. and decide what should happen to each span or trace.

  1. 1

    Keep every trace with an error

    Root spans, if any span in the trace has an error keep every trace

    A failing request reaches your vendor whole, whatever else you sample.

  2. 2

    Keep every slow trace

    Root spans, if the trace takes over 2s keep every trace

    Slow requests are the ones you open first, so they always arrive.

  3. 3

    Sample the rest

    Root spans keep 1 in 10 traces

    Kept spans carry SampleRate = 10, so counts in e.g. Honeycomb still reflect real traffic.

  4. 4

    Roll up loops

    Child spans, if db.system is mysql2 roll up spans with the same parent and name

    A loop of a thousand queries leaves as one span with its count and timings (avg, max, min, etc.).

Head & tail-based sampling approaches, pushed live instantly so you can react to changes in your telemetry traffic.

Cut trace volume & noise without losing insight

Sample traces
Keep 1 in N traces. The choice comes from the trace ID, so all services agree on sampling and we avoid gaps.
Sample spans
Only capture the repetitive "auth" service spans on 1 in N kept traces.
Re-parent or roll up spans
Replace a run of like spans with one span that carries their count, total, minimum and maximum duration.
Collapse spans into children
Remove a wrapper span, copy its attributes onto its children and move them up a level.
Drop noisy spans or metrics
Drop a span, a whole trace, or every trace without an error. Drop attributes you never read. Synchronous spans, such as middleware, are dropped as they end unless a rule keeps them.
Reshape metrics
Views drop metrics and remove the attributes that multiply series, before anything is exported.

Less volume, same story

Sending less only helps if the traces you need are still there. SpanSlice is built so they are.

Decisions use the whole trace
The SDK holds a trace until its root ends, so a rule can ask whether any span failed or how long the trace took.
Sample rate
Spans have a SampleRate, so a vendor’s counts still match real traffic. Span metrics count every span before any rule runs.
No gaps between services
Services that use the same rate make the same choice for the same trace.
Spans that never finish still show up
Stuck Span Detection reports a span that stays open past a timeout you set, as an “(incomplete)” snapshot.
Archive dropped spans for retroactive investigation
Archive the spans you don’t send to a bucket you own, and open them in the app when an incident needs them.

Change rules without guessing

Rules take effect in running services in seconds, with no deploy. Before they do, you can see exactly what they will do.

Build a rule from conditions and actions

A rule says when it runs, which spans or traces it matches, and what happens to them. This one fires when a root span completes, matches traces over 2 seconds, and sets their sample rate to 1 so every one is kept.

The rule editor open beside the rules list: when a root span is completed and trace duration is over 2 sec, set sample to 1 in 1 if not set.

Replay a trace through your rules

Load a trace, then step through it. The tester shows which rule kept, sampled, rolled up or dropped each span, and why. It runs the same SDK code your services run.

The rule tester: a list of rules on the left, and a trace on the right where one middleware span is marked dropped and the rest are marked sent.

Review changes before they go live

Mark an environment as require-commit, and edits wait until someone commits them. Each change shows what it changed, with a Revert beside it.

The Commit to Production dialog listing one edited rule, with a Revert button and a Commit 1 change button.

Watch every decision as it happens

Live Tail streams the spans a running service handles, each marked sent or dropped, and why. Open a trace to see which of its spans went out.

Live Tail: a table of traces marked sent or dropped, with one trace open beside it showing its spans on a timeline.

Know what you will send

Home shows spans kept and dropped by the hour, why each was dropped, and what you are on course to send per day, week and month.

The Home page: spans kept and dropped, projected usage per day, week and month, and a chart of spans by hour.

Works with what you already run

OpenTelemetry
Works with the instrumentation you already have.
Honeycomb
Send with OpenTelemetry, or with libhoney if you haven’t moved yet.
Sentry
Send the traces SpanSlice keeps, and link Sentry errors to their spans.
Node.js
The SDK runs inside your Node.js services.

Redact attributes before they leave the process, too: replace a value, mask it, or send only its type and length.

Help us shape SpanSlice