Skip to content

Commit 11e3f8b

Browse files
committed
fix: Add finish method to the Span interface
1 parent 679d2db commit 11e3f8b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/hub/test/span.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Span, Hub, Scope, TRACEPARENT_REGEXP } from '../src';
1+
import { Hub, Scope, Span, TRACEPARENT_REGEXP } from '../src';
22

33
describe('Span', () => {
44
let hub: Hub;

packages/types/src/span.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/** Span holding trace_id, span_id */
22
export interface Span {
3+
/** Sets the finish timestamp on the current span and sends it if it was a transaction */
4+
finish(): string | undefined;
35
/** Return a traceparent compatible header string */
46
toTraceparent(): string;
57
/** Convert the object to JSON for w. spans array info only */

0 commit comments

Comments
 (0)