Skip to content

feat: propagate W3C baggage headers into OTel context#124

Draft
betinacosta wants to merge 1 commit into
mainfrom
feat/propagate-baggage-headers
Draft

feat: propagate W3C baggage headers into OTel context#124
betinacosta wants to merge 1 commit into
mainfrom
feat/propagate-baggage-headers

Conversation

@betinacosta
Copy link
Copy Markdown
Member

@betinacosta betinacosta commented May 15, 2026

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

When using auto_instrument(middlewares=[StarletteIASTelemetryMiddleware(...)]), W3C baggage headers from incoming HTTP requests were not visible on spans, as baggage is not extracted from the request headers into the OTel context. This PR fixes it.

Related Issue

Closes #87

(Link to the GitHub issue this PR addresses)

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

Describe how reviewers can test your changes:

  1. Step 1
  2. Step 2
  3. Expected result

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

If this PR introduces breaking changes, please describe:

  • What breaks
  • Migration path for users
  • Alternative approaches considered

Additional Notes

Add any additional context, screenshots, or information that would help reviewers.

@betinacosta betinacosta requested a review from a team as a code owner May 15, 2026 19:01
@betinacosta betinacosta marked this pull request as draft May 15, 2026 19:02
Sign up for free to 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.

StarletteIASTelemetryMiddleware does not propagate W3C baggage headers into OTel context

1 participant