W3CBaggagePropagator.extract ignores all but the first baggage header
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend, distributed-systems
Direzione di ricerca
Inizia leggendo W3CBaggagePropagator.extract e i test di propagazione del baggage; l’issue indica il propagatore e fornisce un riproduttore. Esegui i test pertinenti con un getter di baggage che restituisca due valori di intestazione, quindi conferma che entrambe le coppie chiave/valore compaiano nel baggage estratto. L’issue non segnala alcun assignee né alcuna pull request collegata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe your environment
OS:Debian 12 bookworm / Debian 11 bullseye / macOS 26.7.1 (local)
Python version: Python 3.11 / Python 3.11.5 / 3.13.11 (local)
SDK version: 1.30.0
API version: 1.30.0 / 1.45.1 (local)
Tested this both locally and in our production on different / multiple versions.
We encountered this when using both sentry-sdk and otel together, as sentry is adding its own baggage first, our otel baggage is lost 😭
What happened?
Currently the W3CBaggagePropagator.extract keeps only the first value the getter returns. So if the integration has multiple baggage header entries only the first entry is kept and all other entries are lost. Entries in one baggage header work as expected, multiple baggage headers only the first one is kept.
We encountered this when using both sentry-sdk and otel together, as sentry is adding its own baggage first, our otel baggage is lost 😭
Steps to Reproduce
#Steps to reproduce
from opentelemetry.baggage import get_all
from opentelemetry.baggage.propagation import W3CBaggagePropagator
baggages = {"baggage": ["key1=value1", "key2=value2"]}
print(dict(get_all(W3CBaggagePropagator().extract(baggages))))
#Run with opentelemetry-api==1.45.1.
#Expected result: {'key1': 'value1', 'key2': 'value2'}
#Actual result: {'key1': 'value1'}
Expected Result
{'key1': 'value1', 'key2': 'value2'}
Actual Result
{'key1': 'value1'}
Additional context
I could not find any open issues or PRs fixing this, I also find out that our Go services (otel-go) instances handle this correctly,
they did fix it via: https://github.com/open-telemetry/opentelemetry-go/pull/5973
I do have a CLAUDed draft fix https://github.com/Luxas98/opentelemetry-python/compare/main...fix/baggage-multiple-headers
Would you like me to open the PR against your repo?
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
- Lingua principale
- Python
- Stelle
- 2.7k
- Fork
- 1k
- Merge medio
- 3g 8h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di open-telemetry/opentelemetry-python
-
Delta exponential histogram never goes back to the maximum scale after a wide-range intervalForse già presa @inchang-ing l’ha presa 22 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
open-telemetry/opentelemetry-python#5716 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
open-telemetry/opentelemetry-python#5700 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Tests in test_metric_reader_storage.py assert on process-global mock state instead of on the storage under testForse già presa @ocelotl l’ha presa 44 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
open-telemetry/opentelemetry-python#5638 ·
I maintainer di solito rispondono entro 2 giorni
-
`SpanProcessor.on_end` exceptions escape cleanup and replace application exceptionsForse già presa @somuai l’ha presa 48 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
open-telemetry/opentelemetry-python#5624 ·
I maintainer di solito rispondono entro 2 giorni
-
PeriodicExportingMetricReader discards its shutdown timeoutForse già presa @dwin-gharibi l’ha presa 60 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-telemetry/opentelemetry-python#5574 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di open-telemetry/opentelemetry-python
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
fossasia/visdom-dev#69 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Frontend build fails with Frappe version-16: DataImport is no longer exported by @framework/uiApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
BUG: PROD: v1.3.0-beta Onboarding Profile Picture Misaligns When Name Validation Error AppearsForse già presa @RitikaSen27 l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
AOSSIE-Org/PictoPy#1647 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scopeForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno