Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Update PropagationContext on changes

Đang mở
#5,322 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend, observability-sre

Hướng nghiên cứu

Bắt đầu bằng cách truy vết nơi PropagationContext được cập nhật và kiểm tra logic fallback về span đang hoạt động, bao gồm cách nó tương tác với scope.span. Xem lại mã tracing cũ và các thay đổi của Span First trước khi chỉnh sửa. Hoàn tất khi span_id và parent_span_id phản ánh trạng thái hiện tại và các consumer sử dụng propagation context làm nguồn sự thật duy nhất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
2.2k
Fork
672
Merge trung bình
22 giờ 47 phút
Pull request đã merge (30 ngày)
224

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-python

Tất cả issue của getsentry/sentry-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.