Skip to content

Materialize scoped baggage on current span - #149

Merged
vrslev merged 1 commit into
mainfrom
bugfix/current-span-baggage
Aug 27, 2026
Merged

Materialize scoped baggage on current span#149
vrslev merged 1 commit into
mainfrom
bugfix/current-span-baggage

Conversation

@vrslev

Copy link
Copy Markdown
Contributor

Summary

  • extend opentelemetry_baggage_scope with an optional, explicit baggage-to-span attribute mapping
  • materialize supplied non-null values on an already-started recording span
  • preserve existing baggage propagation, exception snapshotting, and caller compatibility

This complements BaggageSpanProcessor: the processor covers server and consumer spans created after baggage exists, while the scope covers spans that start before an authoritative value becomes available.

Verification

  • just test tests/instruments/test_opentelemetry.py
  • just lint-ci
  • just test — 219 passed, 99% coverage
  • git diff --check
  • independent review: no material findings

@vrslevvrslev self-assigned this Aug 27, 2026
@codecov

codecovBot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

FlagCoverage Δ
unittests99.01% <100.00%> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
...obootstrap/instruments/opentelemetry_instrument.py98.67% <100.00%> (+0.03%)⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vrslev
vrslev marked this pull request as ready for review August 27, 2026 13:02
@vrslev
vrslev merged commit 3253ae5 into mainAug 27, 2026
34 of 35 checks passed
@vrslev
vrslev deleted the bugfix/current-span-baggage branch August 27, 2026 13:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vrslev