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

Update PropagationContext on changes

Aperta
#5,322 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia tracciando dove viene aggiornato PropagationContext ed esamina la logica che ricade sullo span attivo, incluso il modo in cui interagisce con scope.span. Esamina il vecchio codice di tracing e le modifiche di Span First prima di apportare modifiche. Il lavoro è completato quando span_id e parent_span_id riflettono lo stato corrente e i consumer usano il contesto di propagazione come unica fonte di verità.

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

Descrizione

Improvement Python Spans

Currently, we only ever update the PropagationContext on trace start or trace continuation. It's then not kept in sync with what's actually going on: for example, the span_id field is never updated to the actual running span, and the parent_span_id field is not updated to the parent of the currently running span.

This means we have a lot of fragmented logic all around, first checking the active span for data, and only falling back to the PropagationContext when not available. The PropagationContext should be the single point of truth.

Goals

  • update the propagation context's span_id, parent_span_id whenever these change, so that they represent the actual current state
  • check for places where we fall back to checking the propagation context and change them so that we use propagation context only (i.e., don't check for current span first, just use whatever is stored in the propagation context)

Notes

  • Might be easier to do after we've ripped out the old tracing code with the changes for Span First.
  • See how this interacts with scope.span
Lingua principale
Python
Stelle
2.2k
Fork
672
Merge medio
23h 14m
PR unite (30g)
218

Guida per i contributori

Apri la 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-python

Tutte le issue di getsentry/sentry-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.