AI tracing: Claude
Set it up in the Claude Console with no code, add the Claude SDK's tracing in your app, or both.
1. No code: add PowerTraces in the Claude Console
An organization admin opens Settings › OpenTelemetry in the Claude Console and clicks Add destination. Pick Custom as the provider and fill in the fields below: your HTTP endpoint as it is (the Console adds /v1/traces itself) and your server key as a Bearer token. Choose Full content to see prompts and answers in the Agent tab, or Metadata only for counts and timings. Within a minute the destination shows Healthy, and every Claude API request and Managed Agents session in the chosen workspaces appears in PowerTraces, from any app or tool, with no code change.
Open Claude Console › OpenTelemetry
Provider Custom
Display name PowerTraces
Endpoint URL https://<address>.powertraces.com
Header name Authorization
Header value Bearer <server key>
Workspaces All (or the ones to trace)
Content mode Full content (or Metadata only)
Maximum content size 7500002. From your code: install the Claude SDK and OpenTelemetry
The Claude SDKs create a span for every request through the tracer provider your app registers, so you only add an exporter.
pip install --upgrade anthropic opentelemetry-sdk opentelemetry-exporter-otlp-proto-http3. Register the tracer provider before the first call
The exporter reads the endpoint and key from the environment variables in the next step.
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from anthropic import Anthropic
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)
client = Anthropic()4. Point it at PowerTraces
Leave the content line out to send counts and timings only.
OTEL_SERVICE_NAME=support-assistant
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=https://<address>.powertraces.com
OTEL_EXPORTER_OTLP_HEADERS=X-Otel-Api-Key=<server key>
ANTHROPIC_OPEN_TELEMETRY_TRACES_CONTENT_MODE=contentUse both for the full picture: with the SDK sending the trace context, the platform's spans (each model request, server tools, agent turns) nest under your app's request. Don't also add another Anthropic instrumentation package, or every call shows twice.
Prompts and answers
Most libraries send only counts and timings until you turn content on. When you do, PowerTraces keeps it, masks personal data, or drops it, as set in AI › Settings for each workspace.
Check it works
Make one model call, then open the AI page: the run appears within a minute. Open it to see each step in the Agent tab.