Using the standard Anthropic SDK? Check out the general Tracing Quickstart for the proxy method that works with any Anthropic client.
Steps
Set up environment variables
Configure the OpenTelemetry exporter to send traces to Scorecard. You’ll need your Scorecard API key from Settings.Optional: To send traces to a specific project, set the project ID:If not set, traces will default to your oldest project in the organization.
Replace
<your_scorecard_api_key> with your actual Scorecard API key (starts with ak_).Run your agent
With the environment variables configured, run your Claude Agent SDK application. All agent activity is automatically traced.
example.py
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.




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) |
OTEL_RESOURCE_ATTRIBUTES | No | Set scorecard.project_id=<id> to target a specific project (defaults to oldest project) |