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: packages/opentelemetry-node/src/spanprocessor.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,12 +40,17 @@ export class SentrySpanProcessor implements OtelSpanProcessor {
40
40
41
41
// If event has already set `trace` context, use that one.
42
42
event.contexts={
43
+
...event.contexts,
43
44
trace: {
45
+
...event.contexts?.trace,
46
+
// We are overriding values here. In theory this is bad and we definitely need to change that in the future.
47
+
// The reason we need to override here is because in the core sdk we apply span data to the trace context at the time of capturing, and apply the propagation context if there is no span on the scope.
48
+
// In the OTEL SDK we never have a span on the scope, meaning that the propagation context is applied.
49
+
// If we now didn't overwrite the trace context here we would end up with the values of the propagation context instead but we want the data from the span.
0 commit comments