Skip to content

Commit 703c5b4

Browse files
committed
fix: Dont require transaction to be on the scope to be delivered correctly
1 parent ef7b3b2 commit 703c5b4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/apm/src/span.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ export class Span implements SpanInterface, SpanContext {
287287
}
288288

289289
return this._hub.captureEvent({
290+
contexts: {
291+
trace: this.getTraceContext(),
292+
},
290293
spans: finishedSpans,
291294
start_timestamp: this.startTimestamp,
292295
tags: this.tags,

packages/hub/src/scope.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ export class Scope implements ScopeInterface {
327327
if (this._transaction) {
328328
event.transaction = this._transaction;
329329
}
330-
if (this._span) {
331-
event.contexts = event.contexts || {};
332-
event.contexts.trace = this._span.getTraceContext();
333-
}
334330

335331
this._applyFingerprint(event);
336332

0 commit comments

Comments
 (0)