If you send both, Raindrop deduplicates them: each model call is counted once.
Claude Platform’s OpenTelemetry support is in beta, and Anthropic may change span names and attributes.
For a wrapper-based integration with more control over users and properties, see
Claude Managed Agents and
Claude Agent SDK.
Prerequisites
- A Raindrop write key from app.raindrop.ai.
- The admin role in your Claude Console organization, to add a destination.
1. Add Raindrop as a destination
-
In the Claude Console, open Settings → OpenTelemetry
(platform.claude.com/settings/telemetry-destinations)
and click Add destination.

-
Fill in the destination:

- Click Add destination.
-
In the destination’s More actions menu, click Test. The Console should report that the test span
was delivered. A
401means the write key or theBearerprefix is wrong.
Add the destination with the Admin API instead
Add the destination with the Admin API instead
Content mode
- Full content: spans carry prompts, responses, system prompts, and tool inputs and outputs. Raindrop needs this mode to create events.
- Metadata only: spans carry models, token counts, timing, and stop reasons, with no text. Raindrop stores the spans in the trace view, but doesn’t create events from them, so they get no signals and aren’t included in event usage or cost.
Messages API
With the destination in place, every Messages API request appears in Raindrop. This works from any client, including raw HTTP. Each request produces:anthropic.messages.create: the request, with input and output messages, model, stop reason, and usage.anthropic.model_request: each model run inside the request.anthropic.tool_use <name>: each server tool the API ran, such as web search.
traceparent header with each request from a span you own,
so all the requests of one user turn share a trace. Without it, each request starts its own trace.
Claude SDK
The Claude SDK emits its own spans: one per request, one per tool the tool runner runs (with real duration and status), and one for the whole tool runner loop. It also sendstraceparent, so the API
destination’s spans nest under the SDK’s in the same trace.
Register a tracer provider that exports to Raindrop before you create the client:
contentMode: the SDK defaults to metadata only. Setcontentto send prompts and responses (the env varANTHROPIC_OPEN_TELEMETRY_TRACES_CONTENT_MODE=contentdoes the same). Without the destination, metadata-only SDK spans create no events.- Conversations: pass a conversation ID per call in the request options
(
{ openTelemetry: { conversationId } }). Raindrop uses it as the event’s conversation. - Without the destination, Raindrop builds events from the SDK spans alone. You lose the per-model-run spans and server tool spans, which only the API emits.
Claude Managed Agents
The destination covers Managed Agents sessions with no code changes:anthropic.session.turn: each agent turn, with its input, output, system prompt, and stop reason.anthropic.model_request: each model run in the turn, with token usage.anthropic.tool_use <name>/anthropic.mcp_tool_use <name>: tools the agent ran in Anthropic’s cloud sandbox (bash, file tools, web fetch, MCP).
requires_action, and your tool result starts the next. Raindrop records
the whole chain as one event, with the user’s message as input, the final answer as output, the
custom tool calls, and the usage of every turn.
Add SDK tracing (as above) to also get a span for each custom tool your app runs
with the session tool runner (client.beta.sessions.events.toolRunner), with duration and status.
Keep each user message in one trace. Raindrop chains the turns of one user message within a single
trace. Send the user message and the tool results from inside one span of yours:
Self-hosted sandboxes
In a self-hosted sandbox, Claude runs on Anthropic’s side, but an environment worker on your infrastructure runs every tool. This applies wherever the worker runs: AWS (for example Lambda MicroVMs), a VPS, Kubernetes, or a provider such as Modal or E2B. The API destination never sees those tool runs, so:- Set up SDK tracing in the worker process, exporting to Raindrop as above. The
EnvironmentWorkerin the Python, TypeScript, and Go SDKs (andant beta:worker poll) then emits:anthropic.environment.work: one span per work item, withanthropic.environment.id,anthropic.environment.work.id, andanthropic.session.id.- A tool span for each tool it runs (
bash,read, your custom tools), with duration and status. - Spans for its own requests, including the tool results it sends back.
- Allow outbound HTTPS from the sandbox to
api.raindrop.ai. - Keep the API destination on for the turns and model requests.
How spans become events
Identifying users
Claude’s spans don’t carry your application’s user ID yet. Until they do, Raindrop uses a fallback: the request ID for Messages API events and the session ID for Managed Agents events. These fallback users are marked with the event propertyuser_id_source, so you can filter them out of user analytics.
Limits
- Raindrop accepts OTLP/HTTP protobuf exports up to 10 MB compressed and 32 MiB decompressed. Claude’s per-span content limit is well below this.
- Raindrop counts each Claude span toward your OTLP rate limit. An always-on self-hosted worker also emits a small span per poll; these never become events.
Known limitations
- Managed Agents turns in separate traces aren’t grouped. When one user message’s turns land in different traces (self-hosted sandboxes, or tool results sent from separate requests), the event covers the final turn’s trace only. The user’s prompt and the earlier turns’ usage are missing from that event.
- Metadata-only mode creates no events. Spans appear in the trace view only.
- Late spans. Spans that arrive after Raindrop finalizes an event (by default, about 30 seconds after the trace goes quiet) are stored in the trace view but not added to the event.
Troubleshooting
The Test button fails. Check that the endpoint ishttps://api.raindrop.ai with no /v1/traces
suffix, and that the header value is Bearer followed by your write key.
No Messages API events. Make sure the destination covers the workspace your API key belongs to. If
your key isn’t scoped to a workspace, requests go to the workspace you name in the
anthropic-workspace-id header, or to the default workspace.
SDK spans are missing. Register the tracer provider before you create the client, and call
provider.shutdown() (or forceFlush()) before a short-lived process exits.
A tool shows no duration. Only spans from code that runs the tool (the SDK tool runner or a
self-hosted worker) carry timing. Calls read from messages have none.
Spans appear twice in the trace view. You have two destinations pointing at Raindrop for the same
workspace. Raindrop still creates one event, but remove the extra destination.