File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { SDK_VERSION } from '@sentry/browser';
9
9
import { GLOBAL_OBJ } from '@sentry/utils' ;
10
10
import Ember from 'ember' ;
11
11
12
+ import type { Transaction } from '@sentry/types' ;
12
13
import type { EmberSentryConfig , GlobalConfig , OwnConfig } from './types' ;
13
14
14
15
function _getSentryInitConfig ( ) : EmberSentryConfig [ 'sentry' ] {
@@ -68,6 +69,11 @@ export function InitSentryForEmber(_runtimeConfig?: BrowserOptions): void {
68
69
69
70
type RouteConstructor = new ( ...args : ConstructorParameters < typeof Route > ) => Route ;
70
71
72
+ export const getActiveTransaction = ( ) : Transaction | undefined => {
73
+ // eslint-disable-next-line deprecation/deprecation
74
+ return Sentry . getCurrentHub ( ) . getScope ( ) . getTransaction ( ) ;
75
+ } ;
76
+
71
77
export const instrumentRoutePerformance = < T extends RouteConstructor > ( BaseRoute : T ) : T => {
72
78
// eslint-disable-next-line @typescript-eslint/no-explicit-any
73
79
const instrumentFunction = async < X extends ( ...args : unknown [ ] ) => any > (
You can’t perform that action at this time.
0 commit comments