Skip to content

Commit aa2f820

Browse files
authored
Update src/Sentry.OpenTelemetry/SentrySpanProcessor.cs
comment
1 parent d189a78 commit aa2f820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sentry.OpenTelemetry/SentrySpanProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public override void OnEnd(Activity data)
157157

158158
// Transactions set otel attributes (and resource attributes) as context.
159159
transaction.Contexts["otel"] = GetOtelContext(attributes);
160-
160+
// Events are received/processed in a different AsyncLocal context. Restoring the scope that started it.
161161
var activityScope = data.GetFused<Scope>();
162162
if (activityScope is { } savedScope && _hub is Hub hub)
163163
{

0 commit comments

Comments
 (0)