Commit b59ce07
authored
As a first step for
#12385, I looked
though our current implementations, and tried to streamline this. We
have a bunch of somewhat duplicate code there that handles sentry-trace
& baggage headers _mostly_ the same but not _fully_ the same, as well as
relatedly the DSC.
To streamline this, I added some new methods in core:
* `getTraceData` already exists, but was extended to also allow to pass
a specific `span` to it. I updated some code to use this method that
hasn't used it before, and also added some more tests - also around the
ACS and the otel-specific implementation for this.
* For this and edge cases, there are new primitives
`getDynamicSamplingContextFromScope` and `getTraceContextFromScope`
which handle picking these things from given scope etc.
While working on this, I also noticed that `captureCheckIn` in
ServerRuntimeClient was actually not properly working in Node (OTEL), as
it relied on the core way of scope-span coupling. So I also updated this
to actually work as expected.
1 parent cf368b1 commit b59ce07
File tree
22 files changed
+588
-355
lines changed- dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines
- docs/migration
- packages
- browser/src/tracing
- core
- src
- tracing
- utils-hoist
- utils
- test/lib/utils
- node/src/sdk
- opentelemetry
- src
- utils
- test/utils
- remix
- src/utils
- test/integration/test/client
22 files changed
+588
-355
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | | - | |
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | | - | |
29 | | - | |
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
| |||
76 | 69 | | |
77 | 70 | | |
78 | 71 | | |
79 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
87 | | - | |
| 82 | + | |
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
| |||
401 | 396 | | |
402 | 397 | | |
403 | 398 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 399 | + | |
407 | 400 | | |
408 | 401 | | |
409 | | - | |
410 | 402 | | |
411 | 403 | | |
412 | 404 | | |
| |||
417 | 409 | | |
418 | 410 | | |
419 | 411 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 412 | + | |
| 413 | + | |
427 | 414 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
436 | 418 | | |
437 | 419 | | |
438 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
672 | 671 | | |
673 | 672 | | |
674 | 673 | | |
675 | | - | |
| 674 | + | |
676 | 675 | | |
677 | 676 | | |
678 | 677 | | |
| |||
692 | 691 | | |
693 | 692 | | |
694 | 693 | | |
695 | | - | |
696 | | - | |
697 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
698 | 697 | | |
699 | 698 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
| 699 | + | |
711 | 700 | | |
712 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
713 | 705 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | 706 | | |
720 | 707 | | |
721 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
0 commit comments