You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,13 @@
21
21
-`SentryAttribute.stringAttribute()` takes a `String` value
22
22
- We opted for handling parameters via `SentryLogParameters` to avoid creating tons of overloads that are ambiguous.
23
23
24
+
### Fixes
25
+
26
+
- Isolation scope is now forked in `OtelSentrySpanProcessor` instead of `OtelSentryPropagator` ([#4434](https://github.com/getsentry/sentry-java/pull/4434))
27
+
- Since propagator may never be invoked we moved the location where isolation scope is forked.
28
+
- Not invoking `OtelSentryPropagator.extract` or having a `sentry-trace` header that failed to parse would cause isolation scope not to be forked.
29
+
- This in turn caused data to bleed between scopes, e.g. from one request into another
30
+
24
31
### Dependencies
25
32
26
33
- Bump Spring Boot to `3.5.0` ([#4111](https://github.com/getsentry/sentry-java/pull/4111))
Copy file name to clipboardExpand all lines: sentry-opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry/OtelSentryPropagator.java
Copy file name to clipboardExpand all lines: sentry-opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry/OtelSentrySpanProcessor.java
fun`forks scopes from context if present without headers`() {
64
-
val propagator =OtelSentryPropagator()
65
-
val carrier:Map<String, String> =mapOf()
66
-
val scopeInContext =Sentry.forkedRootScopes("test")
67
-
68
-
val newContext = propagator.extract(Context.root().with(SENTRY_SCOPES_KEY, scopeInContext), carrier, MapGetter())
69
-
70
-
val scopes = newContext.get(SENTRY_SCOPES_KEY)
71
-
assertNotNull(scopes)
72
-
assertSame(scopeInContext, scopes.parentScopes)
73
-
}
74
-
75
-
@Test
76
-
fun`forks root scopes if none in context with headers`() {
77
-
val propagator =OtelSentryPropagator()
78
-
val carrier:Map<String, String> =mapOf(
79
-
"sentry-trace" to "f9118105af4a2d42b4124532cd1065ff-424cffc8f94feeee-1",
80
-
"baggage" to "sentry-environment=production,sentry-public_key=502f25099c204a2fbf4cb16edc5975d1,sentry-sample_rand=0.456789,sentry-sample_rate=0.5,sentry-sampled=true,sentry-trace_id=df71f5972f754b4c85af13ff5c07017d"
81
-
)
82
-
83
-
val newContext = propagator.extract(Context.root(), carrier, MapGetter())
fun`forks scopes from context if present with headers`() {
92
-
val propagator =OtelSentryPropagator()
93
-
val carrier:Map<String, String> =mapOf(
94
-
"sentry-trace" to "f9118105af4a2d42b4124532cd1065ff-424cffc8f94feeee-1",
95
-
"baggage" to "sentry-environment=production,sentry-public_key=502f25099c204a2fbf4cb16edc5975d1,sentry-sample_rand=0.456789,sentry-sample_rate=0.5,sentry-sampled=true,sentry-trace_id=df71f5972f754b4c85af13ff5c07017d"
96
-
)
97
-
val scopeInContext =Sentry.forkedRootScopes("test")
98
-
99
-
val newContext = propagator.extract(Context.root().with(SENTRY_SCOPES_KEY, scopeInContext), carrier, MapGetter())
100
-
101
-
val scopes = newContext.get(SENTRY_SCOPES_KEY)
102
-
assertNotNull(scopes)
103
-
assertSame(scopeInContext, scopes.parentScopes)
104
-
}
105
-
106
50
@Test
107
51
fun`invalid sentry trace header returns context without modification`() {
0 commit comments