Commit 9a9fbfe
authored
fix: Make PropagationContext.from_incoming_data always return a PropagationContext (#5186)
### Description
When there is any sort of incoming data, and since `continue_trace` is
always intended to be at a system boundary, we always want to force a
new trace if there's no incoming propagation or a mismatched propagation
headers (for `strict_trace_continuation`).
What previously happened in these cases: a single `trace_id` was kept
alive in the `propagation_context` even when these were meant to be new
independent traces (see screenshot that shows undesired behavior before
this fix).
I think this will actually solve many complaints about long living
traces that were never supposed to be such.
<img width="1828" height="649" alt="image"
src="https://github.com/user-attachments/assets/dd14e74a-0c0c-44a0-affc-994519655ab3"
/>1 parent 9c9510d commit 9a9fbfe
File tree
3 files changed
+20
-8
lines changed- sentry_sdk
- tests/tracing
3 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
517 | 517 | | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
466 | | - | |
| 467 | + | |
467 | 468 | | |
468 | | - | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
0 commit comments