Skip to content

Add scoped OpenTelemetry baggage context - #145

Merged
vrslev merged 1 commit into
mainfrom
feature/VA-7612-baggage-scope
Aug 25, 2026
Merged

Add scoped OpenTelemetry baggage context#145
vrslev merged 1 commit into
mainfrom
feature/VA-7612-baggage-scope

Conversation

@vrslev

@vrslevvrslev commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expose a shared opentelemetry_baggage_scope context manager.
  • Override or remove authoritative baggage values while preserving unspecified baggage.
  • Restore the parent OpenTelemetry context after success or failure.
  • Keep transport propagation delegated to the existing HTTP and aio-pika instrumentation.

Verification

  • Targeted OpenTelemetry and FastStream suites: 26 passed.
  • Ruff format/check passed.
  • MyPy passed for the changed library files.
  • git diff --check passed.

Scope

This follow-up does not change FastStream middleware or Rabbit correlation IDs. The business conversation_id remains distinct from FastStream’s per-message messaging.message.conversation_id.

@codecov

codecovBot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

FlagCoverage Δ
unittests98.78% <100.00%> (+<0.01%)⬆️

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

Files with missing linesCoverage Δ
microbootstrap/__init__.py100.00% <ø> (ø)
...obootstrap/instruments/opentelemetry_instrument.py98.59% <100.00%> (+0.10%)⬆️
🚀 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 25, 2026 15:33
@vrslev
vrslev merged commit 2586718 into mainAug 25, 2026
18 checks passed
@vrslev
vrslev deleted the feature/VA-7612-baggage-scope branch August 25, 2026 15:33
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