Commit 92f5f0a
authored
Fix ThreadingIntegration by carrying forward span reference in (#3851)
`use_scope`
Since the otel context span reference is the source of truth for the
current active span, we need to explicitly pass the span reference on
the scope through when we use `use_scope` since we are changing context
variables in the other thread.
Also,
* fixes some typing in the original scope
* adds more types to the `contextvars_context` manager1 parent 8ce7510 commit 92f5f0a
File tree
6 files changed
+51
-33
lines changed- sentry_sdk
- integrations
- opentelemetry
- tests/integrations/threading
6 files changed
+51
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
22 | 39 | | |
23 | | - | |
| 40 | + | |
| 41 | + | |
24 | 42 | | |
25 | 43 | | |
26 | 44 | | |
27 | 45 | | |
28 | 46 | | |
| 47 | + | |
| 48 | + | |
29 | 49 | | |
30 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
31 | 59 | | |
32 | 60 | | |
33 | 61 | | |
| |||
40 | 68 | | |
41 | 69 | | |
42 | 70 | | |
43 | | - | |
| 71 | + | |
44 | 72 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 29 | + | |
| 30 | + | |
41 | 31 | | |
42 | 32 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 33 | | |
47 | 34 | | |
48 | 35 | | |
| |||
99 | 86 | | |
100 | 87 | | |
101 | 88 | | |
102 | | - | |
| 89 | + | |
| 90 | + | |
103 | 91 | | |
104 | 92 | | |
105 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
672 | | - | |
| 673 | + | |
673 | 674 | | |
674 | 675 | | |
675 | 676 | | |
| |||
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
780 | | - | |
| 781 | + | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
786 | | - | |
| 787 | + | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | | - | |
| 1283 | + | |
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments