getsentry / getsentry/sentry-python

Update PropagationContext on changes

オープン
#5,322 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Improvement Python Spans
主要言語
Python
スター
2.2k
フォーク
669
平均マージ
1日 1時間
マージ済み PR(30日)
213

説明

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`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。