Skip to content

Commit fe90612

Browse files
committed
ref: Change getActivitySpan to not check hub
1 parent b43352e commit fe90612

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [gatsby] feat: Add @sentry/gatsby package (#2652)
1212
- [core] ref: Rename `whitelistUrls/blacklistUrls` to `allowUrls/denyUrls`
1313
- [react] ref: Refactor Profiler to account for update and render (#2677)
14+
- [tracing] feat: Add ability to get span from activity using `getActivitySpan` (#2677)
1415

1516
## 5.17.0
1617

packages/apm/src/integrations/tracing.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -879,14 +879,9 @@ export class Tracing implements Integration {
879879
if (!id) {
880880
return undefined;
881881
}
882-
if (Tracing._getCurrentHub) {
883-
const hub = Tracing._getCurrentHub();
884-
if (hub) {
885-
const activity = Tracing._activities[id];
886-
if (activity) {
887-
return activity.span;
888-
}
889-
}
882+
const activity = Tracing._activities[id];
883+
if (activity) {
884+
return activity.span;
890885
}
891886
return undefined;
892887
}

0 commit comments

Comments
 (0)