Repository navigation
feat: support Python OpenTelemetry span customizers - #916
Draft
Andrew Kent (realark) wants to merge 2 commits into
Draft
Andrew Kent (realark) wants to merge 2 commits into
Andrew Kent (realark) wants to merge 2 commits into
Conversation
Andrew Kent (realark)
force-pushed
the
ark/SDK-473-otel-span-customizers
branch
from
October 12, 2026 19:37
2743e6a to
7b2a438
Compare
Contributor
Author
|
Amended the single SDK-473 commit to 7b2a438. The protobuf HTTP test receiver resolves its generated request class through the public protobuf symbol database, avoiding unsupported static imports of runtime-generated symbols. No lint suppressions added. Full pylint and all three OTel version suites passed locally (64 tests each, including real protobuf/HTTP exports). All hosted CI checks now pass across Python 3.10–3.14 on Linux/Windows, including static checks, nox suites, smoke tests, and checks-passed: https://github.com/braintrustdata/braintrust-sdk-python/actions/runs/38298845721 |
Andrew Kent (realark)
force-pushed
the
ark/SDK-472-customizer-error-handling
branch
2 times, most recently
from
October 13, 2026 02:08
48c17d9 to
e430ff3
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.
Summary
Implements SDK-473. Stacked on and dependent on SDK-472 (
ark/SDK-472-customizer-error-handling); merge the error-handling base first.set_span_customizers/ synchronouson_span_exportfor directOtelExporter,BraintrustSpanProcessor, and OTel compatibility mode, with no second configuration API and no double invocation.Verification
All executed on Python 3.12.12:
mise exec -- nox -s "test_otel(1.16.0)" "test_otel(1.44.0)" "test_otel(latest)" test_otel_not_installed test_core -- -q: all five sessions passed. OTel: 64 tests per version (latest = 1.45.0). No-OTel: 8 passed / 56 skipped. Core: 987 passed / 95 skipped / 12 xfailed / 21 subtests passed..nox/test_otel-latest/bin/python -m pytest -p no:braintrust src/braintrust/otel src/braintrust/test_span_customizer.py -q: 59 passed.Limitations
Local version matrix uses Python 3.12; CI covers the remaining supported Python versions. OTel 1.16 emits two upstream protobuf deprecation warnings. Scope attributes require a supporting OTel version; the old SDK exposes none and does not serialize them. Explicit repeated export calls rerun hooks; internal transport retries reuse serialized data.