Metering Tokens

Metering tokens are Sophonz's usage billing unit — covering session-based sampling, custom logs, and stack-trace deduplication.

Metering tokens are Sophonz's usage billing unit. While the SDK runs, it checks your project's usage in real time and consumes tokens by sampling per session. Spans, custom logs, and stack-trace logs all draw from the same tokens.

What is a metering token

A metering token is a usage credit denominated in dollars. The baseline is $20 worth of tokens ≈ 100K spans/month. Every plan includes a token allowance, and tokens can be spent on spans, custom logs, or stack-trace logs.

Usage itemBilling basis
Spans$20 / 100K spans (≈ $0.0002 per span)
Custom logsS3 Standard storage rate per compressed MB
Stack-trace logsDeduplicated by hash; only one representative is billed

Session-based sampling

The SDK samples data per session, not per individual request. When a session starts, the SDK checks the project's current usage (remaining tokens) and automatically adjusts the collection rate to fit the quota.

  • Because a whole session is sampled together, collected traces always contain the complete user journey — they are never cut off mid-request.
  • As usage approaches the quota, the sampling rate is lowered to prevent token exhaustion.
  • When tokens are plentiful, more is collected at a higher rate.

Custom logs

Custom logs also consume metering tokens. Logs are stored compressed in ClickHouse and billed on the S3 Standard storage rate per compressed MB ($0.023/GB-month) — so 1MB compressed is about $0.0000225/month.

Logs compress extremely well, so they consume almost no tokens. ClickHouse uses LZ4 by default (~2–4×) and ZSTD optionally (~3–9×); combined with columnar storage, log data compresses 10× or more (up to 170× for well-structured logs).

NOTE

How much is 1MB of compressed logs? At a ~10:1 ClickHouse ZSTD ratio, that's roughly 10MB of raw text — about 2,500 A4 pages at 10pt (assuming ~4,000 characters per page). Well-structured logs pack several times more into the same 1MB.

Stack-trace logs

Error and crash stack traces tend to repeat the same fault many times. Sophonz groups and samples stack traces by the hash of the error title and body (stack frames).

  • The same hash (i.e., an identical stack trace) stores its body only once.
  • Duplicate occurrences of the same hash collected by the collector are linked to a single representative stack trace via multiple spanIds. Even if the same error happens thousands of times, the body is kept once and only each occurrence's spanId is accumulated.
  • As a result, even high-volume repeating errors consume almost no additional tokens, while frequency and blast radius (which sessions/requests they came from) remain fully traceable.

Billing modes

Paid plans (Pro and Business) let you choose between two billing modes.

  • Flat plan: includes a metering-token allowance at a discounted price. As usage nears the quota, data is sampled automatically per session, staying within quota at no extra cost.
  • Pay as you go: a lower base fee plus billing for exactly what you use. You set a usage cap and collect at a fixed sampling rate, keeping both cost and data fidelity predictable.
PlanFlatPay as you go (base)
Pro$49/mo$20/mo + usage
Business$199/mo$70/mo + usage

Plans

Each plan includes a monthly metering-token allowance. Tokens are shared across spans, custom logs, and stack traces; the span figures below are the equivalent if you spent the entire allowance on spans.

PlanMetering tokens (list)PriceSpan equivalentRetention
Free$20 tokens/moFree100K spans/mo30 days
Pro$200 tokens/mo$49/mo1M spans/mo90 days
Business$1,000 tokens/mo$199/mo5M spans/mo365 days
EnterpriseCustomContactCustomCustom
  • Thanks to compression and deduplication, custom logs and stack traces collect far more per token than spans.
  • When usage exceeds the included tokens, the session sampling rate is lowered automatically, staying within quota at no extra cost.

TIP

See the pricing page for a plan-by-plan comparison.