Skip to content

Commit 91b56b5

Browse files
committed
make getTransaction return transaction on scope regardlesss of sampling decision
1 parent 3fc76dd commit 91b56b5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/hub/src/scope.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,7 @@ export class Scope implements ScopeInterface {
212212
* @inheritDoc
213213
*/
214214
public getTransaction(): Transaction | undefined {
215-
const span = this.getSpan() as Span & { spanRecorder: { spans: Span[] } };
216-
if (span && span.spanRecorder && span.spanRecorder.spans[0]) {
217-
return span.spanRecorder.spans[0] as Transaction;
218-
}
219-
return undefined;
215+
return this.getSpan() as Transaction;
220216
}
221217

222218
/**

0 commit comments

Comments
 (0)