Using the standard Anthropic SDK? Check out the general Tracing Quickstart for the proxy method that works with any Anthropic client.
Steps
1
Set up environment variables
Configure the OpenTelemetry exporter to send traces to Scorecard. You’ll need your Scorecard API key from Settings.
Replace
<your_scorecard_api_key> with your actual Scorecard API key (starts with ak_).2
Run your agent
With the environment variables configured, run your Claude Agent SDK application. All agent activity is automatically traced.
example.py
3
View traces in Scorecard
Navigate to the Records page in Scorecard to see your agent traces.
Click on any record to view the full trace details, including the complete request/response data and model usage.

It may take 1-2 minutes for traces to appear on the Records page.


Records page showing agent traces


Trace details with request/response data and model usage
What Gets Traced
The Claude Agent SDK automatically captures:| Trace Data | Description |
|---|---|
| LLM Calls | Every messages.create call with full prompt and completion |
| Tool Use | Tool invocations, inputs, and outputs as nested spans |
| Model Usage | Input, output, and total token counts per call |
| Model Info | Model name, parameters, and configuration |
| Errors | Any failures with full error context |
Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
OTEL_EXPORTER_OTLP_HEADERS | Yes | Authentication header: Authorization=Bearer <scorecard_api_key> |
ENABLE_BETA_TRACING_DETAILED | Yes | Set to 1 to enable detailed tracing |
BETA_TRACING_ENDPOINT | Yes | OTLP endpoint URL (use https://tracing.scorecard.io/otel for Scorecard) |