otel_tracer: stale b3 header forwarded upstream
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 67/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- networking
Direzione di ricerca
Read plugins/experimental/otel_tracer/otel_tracer.cc around the incoming B3 header handling and outbound request header writing, plus plugins/experimental/otel_tracer/tracer_common.h where the propagator is selected. Reproduce the single-header b3 case and check how the origin receives propagation headers. Done when the outgoing headers consistently identify the ATS span as the origin's parent; the issue leaves the choice of propagation format open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Ran into a tracing bug while testing otel_tracer with single-header b3 requests.
When a request comes in with a single b3 header, ATS reads b3 into parent_headers and starts its span as a child of the client span just fine. The problem is what goes out to the origin. tracer_common.h wires up B3PropagatorMultiHeader, so otel_tracer.cc writes X-B3-TraceId, X-B3-SpanId, and X-B3-Sampled onto the request and leaves the old b3 header sitting there. Now the upstream request has both formats, and they don't match.
That breaks the trace chain downstream. In opentelemetry-cpp 1.19.0, and per the B3 spec, the extractor checks b3 first and ignores X-B3-* if b3 is present. So a B3 origin grabs the client's span ID out of the stale b3 header and skips right past ATS. You end up with ATS hanging off to the side as a sibling instead of sitting between the client and the origin.
I tested this on Ubuntu 24.04 with Traffic Server 11.0.0 built from master, opentelemetry-cpp 1.19.0, protobuf 3.21.12, and nlohmann-json 3.11.3. I sent b3: 463ac35c9f6413ad48485a3953bb6124-a2fb4a1d1a96d312-1 through ATS with otel_tracer.so enabled. ATS exported span 3aa4178cab7d8bf9 with parent a2fb4a1d1a96d312, and the origin got these B3 headers:
b3: 463ac35c9f6413ad48485a3953bb6124-a2fb4a1d1a96d312-1
X-B3-Sampled: 1
X-B3-SpanId: 3aa4178cab7d8bf9
X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124
When I ran opentelemetry-cpp 1.19.0's B3 extractor on those exact headers, it returned span_id=a2fb4a1d1a96d312 instead of 3aa4178cab7d8bf9. Requests that already come in as multi-header X-B3-* work fine since set_request_header overwrites them.
Dropping the incoming b3 header before writing X-B3-* would stop the stale header from winning, or the plugin could inject single-header b3 when that's what came in. Happy to put up a PR if you have a preference between the two.
- Lingua principale
- C++
- Stelle
- 2k
- Fork
- 903
- Merge medio
- 4g 4h
- PR unite (30g)
- 135
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 apache/trafficserver
-
UnixNetVConnection::do_io_write with a null reader leaves the previous reader in the write VIOForse già presa @NginxL l’ha presa oggi. ApertaBug Good First Issue IOBuffer Network
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#14220 ·
I maintainer di solito rispondono entro 2 giorni
-
MallocAllocator does not check for allocation failureForse già presa @umrndem l’ha presa oggi. ApertaBug Core Good First Issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#14218 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Bug Event System Threads
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#14217 ·
I maintainer di solito rispondono entro 2 giorni
-
TSContScheduleEveryOnPool and TSContScheduleEveryOnThread accept a zero or negative periodForse già presa @rajeetvk l’ha presa 1 giorno fa. ApertaBug Event System Good First Issue TS API
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/trafficserver#14214 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
HostDBContinuation::init memsets a polymorphic ActionForse già presa @ANMOLSCRIPT l’ha presa oggi. ApertaBug Good First Issue HostDB
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/trafficserver#14204 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/trafficserver
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 2 giorni
-
bug data-types
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ClickHouse/clickhouse-cpp#645 ·
I maintainer di solito rispondono entro 1 giorno
-
bug compatibility difficulty:easy prio:normal
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NatronGitHub/openfx-misc#524 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement help wanted P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openscad/openscad#7360 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno