Signals · 3 min read · Updated 2026-10-20

Sampling you can explain

Keep every failing transaction. Sample a tenth of the rest. Ingested traces count toward Data in, not a per-span bill.

Unsampled APM on a busy site is a denial-of-service against your own invoice. Auto-instrumented PDO and fetch can multiply one request into dozens of spans. The metering question is not “how do we count everything?” It is “what is worth counting, and what must never be dropped?”

The problem

Two failure modes show up in every APM rollout. Sample too little and you miss the slow-but-successful checkout. Sample too much — or bill every child span — and the finance meeting becomes a tracing meeting. Tail-based sampling (decide after you have seen the whole trace) needs a collector in the path. Head-based sampling (decide at the start) can run in the SDK.

What it is

Talaria uses head-based sampling in official SDKs. When a transaction starts, the SDK decides whether the trace is in. If it is in, children are recorded. If it is out, the SDK does not send the tree. Dropped spans are not stored and not billed.

  • Tracing stays off until you turn it on under Project settings. The SDK loads the traces sample rate from that document.
  • Once on, transactions that error — span status error, or an error captured in-scope — are sampled at 100%.
  • Successful transactions follow the project traces sample rate. A new project starts at 0.10 (10%).
  • Accepted sampled traces count toward Data in. Dropped (unsampled) spans are not stored and not billed.

Test, staging, and production use the plan meters, including pay-as-you-go. Ingested data counts toward Data in on the plan.

What it gives a team

  • A sentence you can say to a stakeholder: we keep failing requests, we sample a tenth of the rest, we do not charge per SQL statement.
  • Predictable volume. A chatty ORM adds Data in bytes, not a per-query or per-span charge.
  • Debuggability where it matters. The trace attached to an issue is not missing because of a dice roll.

How Talaria does it

SDKs enforce the sample decision. Ingest still validates IDs, caps 200 children per transaction, sanitizes SQL literals and URLs, and accepts sampled traces as Data in via EntitlementService.assertCanAcceptTransaction. Rejected ingest (401 / 422 / 429) is not billed. Request bodies are not captured by default.

OTLP/HTTP JSON at /otlp/v1/traces is an advanced Collector path for teams already on OpenTelemetry. Native SDKs remain the supported way to get head sampling and error-boosted retention.

How to read it

If Performance looks sparse, tracing may still be off in Project settings. If error traces appear but successful ones barely do, you are seeing the project sample rate working as designed — raise it only after you have watched a week of Data in against your plan include.

RED duration is computed from sampled roots. Error rate is not under-sampled the same way, because failures are kept. Do not compare a 10%-sampled p95 to a 100% error count as if they were the same census.

That is the trade head sampling makes for you: every traced error is stored, a tenth of the successful traffic comes along for shape, and your invoice stays explainable.

Turn it on

Turn tracing on under Project settings. Leave the traces sample rate at 0.1 on a production key. Use 1.0 on a staging or development key when you are verifying instrumentation.

Related guides

  • Signals · 3 min

    Transactions, traces, and spans

    A trace is one request’s path. A span is a timed unit of work. Ingested traces count toward Data in.

  • Signals · 3 min

    What SDK-native APM actually is

    Transactions, RED metrics, traces, Web Vitals, and release health from official SDKs — measured inside the request, next to the issue it belongs to.

  • Signals · 3 min

    RED metrics: rate, errors, duration

    Three numbers that describe a service from the outside: how often it is called, how often it fails, and how long it takes.

Turn tracing on

Turn tracing on in Project settings, then inspect transactions next to the issues they belong to.