Claude Platform traces

Start tracing in 5 minutes

Send OpenTelemetry traces of your Claude API requests and Managed Agents sessions to Better Stack. Each model request, tool use, and agent turn arrives as a span with its token usage, latency, and errors.

1. Create a Claude Platform source

Create a new Claude Platform source in Better Stack

2. Add a destination in the Claude Console

As an admin of your Claude Console organization:

  1. Open the OpenTelemetry settings page and click Add destination.
  2. Set Provider to Custom.
  3. Set OTLP endpoint URL to the URL below. Don't add /v1/traces. Claude adds it.
  4. Under Request headers, add the header Authorization with the value below.
  5. Keep Content mode at Metadata only. Choose Full content to also send prompts and responses.
  6. Set Workspaces to All.
  7. Click Add destination.
OTLP endpoint URL
https://$INGESTING_HOST


Authorization header value
Bearer $SOURCE_TOKEN


3. Send a test span

  1. Click Test in the destination's More actions menu.
  2. Open Live tail and select your Claude Platform source marked as spans.
  3. Check that the anthropic.test span arrived.

Test failed?

The Console's message names the error. HTTP 401 or 403 means the Authorization header value doesn't match your source token.

4. Start tracing

Messages API requests and Managed Agents sessions in your workspaces now send their spans to Better Stack, under the service claude-platform. See Tracing for how to explore them, and Anthropic's span reference for every span and attribute Claude sends.

Need help?

Please let us know at hello@betterstack.com. We're happy to help! πŸ™