Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/telemetry.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
import {
defaultStackParser,
getCurrentHub,
Hub,
Integrations,
makeMain,
Expand DownExpand Up@@ -76,8 +77,6 @@ function createSentryInstance(enabled: boolean, integration: string) {
},

transport: makeNodeTransport,

debug: true,
});

const hub = new Hub(client);
Expand All@@ -90,5 +89,8 @@ function createSentryInstance(enabled: boolean, integration: string) {
}

export function traceStep<T>(step: string, callback: () => T): T {
return trace({ name: step, op: 'wizard.step' }, () => callback());
if (getCurrentHub().getScope().getSpan()) {
return trace({ name: step, op: 'wizard.step' }, () => callback());
}
return callback();
}