Skip to content

Commit dd7bb41

Browse files
committed
Update tracing.ts and hub interface
1 parent 214618d commit dd7bb41

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/integrations/src/tracing.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,12 @@ export class Tracing implements Integration {
7474
* @param transaction Optional transaction
7575
*/
7676
public static startTrace(hub: Hub, transaction?: string): void {
77+
const span = hub.startSpan({
78+
transaction,
79+
});
80+
7781
hub.configureScope(scope => {
78-
// scope.startSpan();
79-
scope.setTransaction(transaction);
82+
scope.setSpan(span);
8083
});
8184
}
8285

packages/types/src/hub.ts

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Event, EventHint } from './event';
44
import { Integration, IntegrationClass } from './integration';
55
import { Scope } from './scope';
66
import { Severity } from './severity';
7+
import { Span, SpanDetails } from './span';
78
import { User } from './user';
89

910
/**
@@ -170,4 +171,10 @@ export interface Hub {
170171

171172
/** Returns all trace headers that are currently on the top scope. */
172173
traceHeaders(): { [key: string]: string };
174+
175+
/** JSDoc */
176+
startSpan(spanDetails?: SpanDetails): Span;
177+
178+
/** JSDoc */
179+
finishSpan(span: Span): string | undefined;
173180
}

0 commit comments

Comments
 (0)