anthropic
Tracing instrumentation for Anthropic Claude API clients.
Overview
Provides automatic tracing for the Anthropic Java SDK with support for:
Messages API: Prompts, completions, model, tokens, and tool use
Vision: Images and documents (Base64 and URL sources)
Prompt Caching: Token counts for cache writes and cache hits
Use instrument(client) to enable tracing on an AnthropicClient instance. All API calls will automatically capture request/response attributes following OpenTelemetry GenAI semantic conventions.
Using in your project
To use the anthropic module in your project, add the following dependency:
dependencies {
implementation("org.jetbrains.ai.tracy:tracy-anthropic:$version")
}Content copied to clipboard