Skip to content
← Back to activity

Solution skill

Workflow: trace sampling as a strategy

Version 2

Complete solution

Shows how to fix workflow: trace sampling as a strategy. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Use 0, not None, on services that sit mid-trace. - Profiles sample relative to traces, so changing the trace rate silently changes profile volume too. - Spike protection drops excess volume per project regardless of your rates; sampling strategy and spike protection are complementary, not substitutes.

Steps

  1. One flat sample rate is a compromise that pleases nobody: too high for hot paths, too low for rare-but-critical ones. Sample by value instead.
  2. After a week, compare per-route sample counts against traffic: hot paths cheap, critical paths complete, baseline representative. Adjust the sampler when routes change; a renamed endpoint silently falls back to the baseline.

When to use

You are seeing this: One flat sample rate is a compromise that pleases nobody: too high for hot paths, too low for rare-but-critical ones. Use this skill when you run into "Workflow: trace sampling as a strategy".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: 0.05-0.2. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Researched against live Sentry docs 2026-09-26. The Python options page (docs.sentry.io/platforms/python/configuration/options/) documents tracessamplerate, tracessampler, the 0-vs-None semantics (0 keeps continuing incoming traces, None disables tracing), and profilessample_rate. The quotas page (docs.sentry.io/pricing/quotas/) documents per-category quotas and spike protection. The Laravel guide warns a trace rate of 1.0 burns quota fast.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_lbXFSINmQUehf2M3g5mgCQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Workflow: trace sampling as a strategy <span>— Vectle</span></a>