Skip to main content

Installation

Setup

Python
PandaProbe traces both synchronous and asynchronous Python clients, plus the Promise-based TypeScript client.

Messages API

Span name: "anthropic-messages", SpanKind: LLM
Python
TypeScript
What gets traced
  • Input: system prompt (from top-level system kwarg) plus messages, normalized to a standard format
  • Output: text content blocks
  • Model name
  • Token usage
  • Model parameters: temperature, top_p, top_k, max_tokens, stop_sequences, thinking configuration
  • Extended thinking or reasoning blocks stored in metadata as reasoning_summary

Streaming

Both streaming patterns are fully supported with time-to-first-token tracking. In TypeScript, both messages.create({stream: true, ...}) and messages.stream(...) are instrumented:
TypeScript

Extended thinking

When using Anthropic’s extended thinking feature, thinking blocks are automatically extracted and stored in the span metadata under the reasoning_summary key. Thinking content is stripped from the visible output.

Token usage mapping