Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Threads mistakenly attach to main thread's span

Aperta
#674 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
observability

Direzione di ricerca

Inizia riproducendo la prima chiamata relativa a Sentry in un thread avviato mentre il thread principale ha uno span attivo, quindi esamina come vengono ereditati lo scope e il contesto dello span. Leggi l’issue RUST-25 correlata e il documento collegato sul contesto dei log per avere il contesto necessario. Il lavoro è completato quando il thread figlio non si collega allo span del thread principale, mentre il resto del contesto Sentry rimane disponibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Rust Spans

The first time we call sentry-related functions in a thread, it attaches to whichever Span the main thread is currently attached to.
This causes very wrong sub-spanning (which I just spend 6 hours investigating).
Attaching to sentry client, DSN, parameters..., etc seems correct, but span definitely not.

I feel like maybe the Scope should be a property that's not inherited from whichever scope the main thread happens to be in at that moment, because if there is a sub-thread it's very possible that the main thread is doing unrelated work at that moment, and that unrelated work may very well involve its own spans and data, so it seems that it's not correct to attach to those.

Related issues: RUST-25
Related writeup: https://swatinem.de/blog/log-contexts/

Lingua principale
Rust
Stelle
753
Fork
192
Merge medio
21h 4m
PR unite (30g)
7

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-rust

Tutte le issue di getsentry/sentry-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.