feat: add span customizers (SDK-316) - #104
Draft
Andrew Kent (realark) wants to merge 1 commit into
Draft
Andrew Kent (realark) wants to merge 1 commit into
Andrew Kent (realark) wants to merge 1 commit into
Conversation
Andrew Kent (realark)
force-pushed
the
ark/SDK-316-span-customizers
branch
from
September 24, 2026 20:11
0f29e81 to
b99b260
Compare
Andrew Kent (realark)
force-pushed
the
ark/SDK-316-span-customizers
branch
from
September 25, 2026 15:25
b99b260 to
f0a6aac
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Generated Description
Summary
Implements SDK-316 using the span customizer specification and the Java exporter reference.
ISpanCustomizer.OnSpanExportand ordered configuration registration throughBraintrustConfig.FromEnvironment(...)/Of(...).OpenTelemetry.Proto.Trace.V1.Spanmessages, not applicationActivityinstances..NET representation decision
The upstream .NET OTel exporter accepts Activity, which cannot be safely cloned with identical IDs through public APIs. An optional HTTP handler decodes its OTLP batch, runs hooks, and reserializes before transmission. This adds a decode/encode pass only when configured. Vendored official opentelemetry-proto v1.5.0 schemas retain license headers and a pinned source reference; generated public types use Google.Protobuf and private build-time Grpc.Tools. Upstream retries can invoke hooks again; this is documented.
Verification
dotnet format Braintrust.Sdk.sln --verify-no-changes --no-restorepassed.