Install
Setup
Anthropic traces can include input messages, output messages, tool names, and tool parameters. Review Data Governance before enabling production traffic.
llm.input_messages.*, llm.output_messages.*, tool.name, tool.parameters, and llm.token_count.{prompt,completion}.
Alternative
The Traceloop alternative (opentelemetry-instrumentation-anthropic) emits gen_ai.* and traceloop.*: also recognized by Agnost.
Verify
Run oneclient.messages.create call, then open Raw logs in Agnost. Confirm message and tool-use attributes appear as expected.
Troubleshooting
- Confirm
AnthropicInstrumentor().instrument(...)runs before Anthropic calls. - Confirm
OTEL_EXPORTER_OTLP_HEADERScontainsX-Agnost-Org-ID=<your-org-id>. - Confirm
using_attributeswraps the call you want grouped.
