Summary
InstrumentedAnthropicClient instruments the regular Messages service but delegates the Beta service directly to the underlying client without any wrapping. As a result, all calls through client.Beta.Messages.Create() and client.Beta.Messages.CreateStreaming() — the endpoint used for beta-gated features such as computer use — bypass telemetry entirely and produce no spans.
What is missing
In InstrumentedAnthropicClient (src/Braintrust.Sdk.Anthropic/InstrumentedAnthropicClient.cs):
// line 90 — instrumented ✅
public IMessageService Messages => _instrumentedMessages;
// line 94 — NOT instrumented ❌
public IBetaService Beta => _client.Beta;
The IBetaService interface exposes Beta.Messages as an IBetaMessageService with the same execution methods as the regular messages service:
Beta.Messages.Create(BetaMessageCreateParams) → /v1/messages with anthropic-beta: ... headers
Beta.Messages.CreateStreaming(BetaMessageCreateParams) → streaming variant
These methods are used for beta-gated Anthropic features, the most prominent being computer use (anthropic-beta: computer-use-2024-10-22), which lets Claude interact with desktop GUIs. Any user calling client.Beta.Messages.Create() (or its streaming variant) via a Braintrust-instrumented client gets:
- No activity/span created
- No input content captured
- No output content captured
- No token usage metrics recorded
- No
time_to_first_token measured
For comparison, the regular Messages endpoint is fully wrapped via InstrumentedMessageService.
Braintrust docs status
The Braintrust Anthropic integration docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic explicitly list the Beta Messages API as a supported instrumentation surface:
- For TypeScript:
"anthropic.beta.messages.toolRunner" spans documented
- For Python: Beta messages calls are described as auto-patched
- For .NET: Only the regular Messages API is mentioned — Beta Messages are absent
Status: supported in TypeScript and Python SDKs; not_found for the C# SDK specifically.
Upstream sources
Local files inspected
src/Braintrust.Sdk.Anthropic/InstrumentedAnthropicClient.cs — line 90: Messages is wrapped by InstrumentedMessageService; line 94: Beta is an uninstrumented pass-through to _client.Beta
src/Braintrust.Sdk.Anthropic/InstrumentedMessageService.cs — reference implementation showing the instrumentation pattern (Create and CreateStreaming overrides) that would need to be replicated for IBetaMessageService
src/Braintrust.Sdk.Anthropic/Braintrust.Sdk.Anthropic.csproj — confirms Anthropic v12.5.0 dependency, which includes IBetaService
Summary
InstrumentedAnthropicClientinstruments the regularMessagesservice but delegates theBetaservice directly to the underlying client without any wrapping. As a result, all calls throughclient.Beta.Messages.Create()andclient.Beta.Messages.CreateStreaming()— the endpoint used for beta-gated features such as computer use — bypass telemetry entirely and produce no spans.What is missing
In
InstrumentedAnthropicClient(src/Braintrust.Sdk.Anthropic/InstrumentedAnthropicClient.cs):The
IBetaServiceinterface exposesBeta.Messagesas anIBetaMessageServicewith the same execution methods as the regular messages service:Beta.Messages.Create(BetaMessageCreateParams)→/v1/messageswithanthropic-beta: ...headersBeta.Messages.CreateStreaming(BetaMessageCreateParams)→ streaming variantThese methods are used for beta-gated Anthropic features, the most prominent being computer use (
anthropic-beta: computer-use-2024-10-22), which lets Claude interact with desktop GUIs. Any user callingclient.Beta.Messages.Create()(or its streaming variant) via a Braintrust-instrumented client gets:time_to_first_tokenmeasuredFor comparison, the regular
Messagesendpoint is fully wrapped viaInstrumentedMessageService.Braintrust docs status
The Braintrust Anthropic integration docs at https://www.braintrust.dev/docs/integrations/ai-providers/anthropic explicitly list the Beta Messages API as a supported instrumentation surface:
"anthropic.beta.messages.toolRunner"spans documentedStatus: supported in TypeScript and Python SDKs; not_found for the C# SDK specifically.
Upstream sources
IBetaService: https://github.com/anthropics/anthropic-sdk-csharp/blob/main/src/Anthropic/Services/IBetaService.cs — definesBeta::IMessageService Messages { get; }IBetaService.Messagespresent in this version)Local files inspected
src/Braintrust.Sdk.Anthropic/InstrumentedAnthropicClient.cs— line 90:Messagesis wrapped byInstrumentedMessageService; line 94:Betais an uninstrumented pass-through to_client.Betasrc/Braintrust.Sdk.Anthropic/InstrumentedMessageService.cs— reference implementation showing the instrumentation pattern (CreateandCreateStreamingoverrides) that would need to be replicated forIBetaMessageServicesrc/Braintrust.Sdk.Anthropic/Braintrust.Sdk.Anthropic.csproj— confirmsAnthropicv12.5.0 dependency, which includesIBetaService