Tracing

Every call, with its receipt.

Prompt, tools, retrieval, streamed output, usage and cost — one span tree per request, searchable in under 400 ms across two billion spans a day. Instrument in four lines or point your existing OpenTelemetry exporter at us.

3 msp95 overhead
388 msquery · 2.4B spans
14SDKs & frameworks
13 momax retention
01 — Instrument

Four lines. Then every call is a trace.

The decorator wraps the function; the SDK patches your model client. Nested calls become child spans automatically. Nothing blocks the request thread — spans are batched and flushed off-thread as Arrow.

tracewell-sdk 2.14~/support-copilot
from tracewell import Tracewell, trace

tw = Tracewell(api_key="tw_live_…", project="support-copilot")

@trace(name="answer_ticket", capture=["prompt", "tools", "cost"])
def answer(ticket):
    ctx    = retrieve(ticket.text, k=12)            # → retrieval span
    orders = tools.search_orders(ticket.user_id)   # → tool span
    return llm.complete(render(ctx, orders))       # → llm.completion span

# ✓ trace tr_8f2a41c0 · 6 spans · 1,549 ms · $0.0041
also: OTLP/gRPC · OTLP/HTTP · LangChain · LlamaIndex · Vercel AI SDK · LiteLLMGo · Java · Ruby SDKs in beta

02 — Span tree

The whole request, nested.

A request is a tree, not a line in a log. Tracewell keeps the parent–child structure your code already has: the agent step, the tool it called, the retrieval that fed it, the completion that answered. Click any node for its payload.

  • 01Payloads stored verbatim — prompt, arguments, raw tool response, streamed tokens with timestamps.
  • 02Redaction in-process — email, card numbers, secrets and your regexes are masked before the span leaves your service.
  • 03Time-to-first-token measured per completion, separate from total duration.
trace tr_8f2a41c0 · support-copilot6 spans · 1,549 ms
answer_ticket1,549
prompt.render14
tool.search_orders212
retrieval.pgvector88
llm.completion · gpt-4.11,204
eval.faithfulness31
llm.completion · ttft 388 ms · in 2,118 (cached 1,536) · out 412 · finish stop · $0.0041
output[0:80] "Your order #41882 shipped on 12 Oct and is with the carrier. Tracking shows…"

03 — Tools & retrieval

See what the agent actually did.

Tool calls are first-class spans with arguments, result, status and retries. Retrieval spans keep every chunk, its score, its source and — after the completion — whether the answer used it. Loops, dead tools and ignored context stop being theories.

  • 01Loop detection — same tool, same arguments, N times → flagged on the trace and in alerts.
  • 02Chunk usage — attribution from output back to retrieved context, per chunk.
  • 03Any vector store — pgvector, Pinecone, Weaviate, Qdrant, your own.
span retrieval.pgvector · help-center-v3k=12 · 88 ms
#0“Shipping times by region” 0.91used
#1“Track an order” 0.88used
#2“Returns within 30 days” 0.84—
#3“Carrier delays · October” 0.71used
#4“Gift wrapping options” 0.62—
#5–117 more chunks, max score 0.58—
tool.search_orders · args { customer_id: "c_41b2", status: "open" } · result 2 orders · 1,844 B · ok · 212 ms · retries 0
loop check · 1 call in trace · no repeat

04 — Cost attribution

Know which feature spent the money.

Every completion is priced at the provider's sheet the moment it happens, including cached tokens and batch discounts. Roll it up by feature, tenant, model, release or any attribute you attach. Export to your billing system nightly.

  • 01Per customer — cost of goods per tenant, ready for your margin report.
  • 02Per release — the prompt change that doubled tokens shows up as a step in the chart.
  • 03Budgets — soft and hard caps per feature with alerts at 80%.
LLM cost by feature · last 14 daystotal $16,204 · −41% vs prior
$2k$1.5k$1k$.5k attribution on · loop fixed Oct 1Oct 8Oct 14
support-copilotorder-agentotherrelease v2.13.2

05 — Latency

p95 is a span, not a guess.

Latency breaks down per span type, so you learn whether the slow tail is the model, the vector store or your own tool. Compare p50 / p95 / p99 by model and release. Set a gate on it.

  • 01TTFT vs total — streaming feels fast when first token is fast; we measure both.
  • 02Provider vs you — queueing inside your service is separated from provider time.
  • 03Histogram per model — HDR histograms, 0.1% precision, 13 months.
llm.completion · latency distribution · 24hn = 184,201
p50 · 812 ms p95 · 1,812 p99 · 3,104 08001,6002,4003,200ms
medianpercentilesTTFT p50 388 ms
06 — From request to trace

What happens in the 0.8 seconds after your call.

pipeline · 0%
01SDKbatch · redact · Arrow 02COLLECTOROTLP · 61k spans/s 03STOREcolumnar · per-tenant keys 04QUERYconsole · API · 388 ms 05EVALS · GATESjudges · CI · alerts your serviceyour pipeline

01 · SDK, in your process

Spans are built on the request thread in microseconds, redacted by your rules, then batched off-thread and shipped as Arrow every 200 ms. p95 overhead: 3 ms.

02 · Collector

Stateless OTLP endpoints in eu-central-1 and us-west-2. Backpressure, dedupe, schema validation. Tested to 61k spans/s per tenant.

03 · Store

Columnar storage on object store, indexed by tenant, feature, model and time. Payloads encrypted with per-tenant keys you can revoke.

04 · Query

The console and the API read the same engine: filters over 2.4B spans return in 388 ms at p95. Saved views, shareable trace links.

05 · Evals & gates

Judges score sampled traces asynchronously. Datasets grow from failures. CI gates compare the branch against main before merge.

OpenTelemetryOpenAI SDKAnthropic SDKVertex AIBedrockLangChainLlamaIndexVercel AI SDKLiteLLMOllamapgvectorPineconeWeaviateGitHub ChecksGitLab CIPagerDutySlackDatadog OpenTelemetryOpenAI SDKAnthropic SDKVertex AIBedrockLangChainLlamaIndexVercel AI SDKLiteLLMOllamapgvectorPineconeWeaviateGitHub ChecksGitLab CIPagerDutySlackDatadog
07 — Limits & retention

The numbers you'll ask in the RFP.

Published, not negotiated. If a number here is wrong for you, the Enterprise plan changes it — and we'll say so in writing.

DimensionDeveloperTeamEnterprise
Spans / month1M20M included · $8 / 1M afterunlimited · volume pricing
Retention · spans7 days30 days13 months
Retention · payloads7 days30 days13 months · BYO bucket
Max payload per span256 KB1 MB4 MB
Ingest rate500 spans/s5,000 spans/s61,000 spans/s tested
Query latency · p95388 ms over 2.4B spans (30-day window, 6 filters)
SDK overhead · p953 ms wall-clock, 0 allocations on request thread
Regionseu-central-1eu-central-1 · us-west-2+ self-host (Helm)
ExportCSVCSV · Parquet · webhook+ S3/GCS sync · warehouse
SSO · audit log—SAML · 90-day auditSAML · SCIM · 13-month audit
Instrument in ten minutes

Your first trace is four lines away.

One million spans a month free. OpenTelemetry users: change one exporter URL and you're done.