Skip to main content
Use the trace builder when you want the graph to include application-side runtime work that the provider proxy cannot observe directly.

Quickstart

Start with installation, agent initialization, and your first proxied OpenAI or Anthropic call.

Proxy Helpers

Review the proxy key flow before adding runtime events on top of proxied traffic.

Advanced Patterns

Move there after this page for hybrid flows, self-hosting, and common mistakes.

Manual events mode

Use the exact same trace_id here that you pass in X-Trace-ID on proxied OpenAI or Anthropic calls when you want tool events and model events to stay on the same thread.

Linking events to users

Use external_user_id to associate events with your application user IDs:
The external_user_id is stored on every event and trace, allowing you to filter and analyze traces by your own user identifiers.

Prompt caching usage

Use cacheReadTokens and cacheCreationTokens when your runtime exposes cache-aware usage so the trace cost breakdown stays accurate.

Method map

Hybrid pattern

Use this when you want automatic provider capture from the proxy and explicit application-side timing for tools, jobs, queues, and failures.