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';
99import { GLOBAL_OBJ } from '@sentry/utils' ;
1010import Ember from 'ember' ;
1111
12+ import type { Transaction } from '@sentry/types' ;
1213import type { EmberSentryConfig , GlobalConfig , OwnConfig } from './types' ;
1314
1415function _getSentryInitConfig ( ) : EmberSentryConfig [ 'sentry' ] {
@@ -68,6 +69,11 @@ export function InitSentryForEmber(_runtimeConfig?: BrowserOptions): void {
6869
6970type RouteConstructor = new ( ...args : ConstructorParameters < typeof Route > ) => Route ;
7071
72+ export const getActiveTransaction = ( ) : Transaction | undefined => {
73+ // eslint-disable-next-line deprecation/deprecation
74+ return Sentry . getCurrentHub ( ) . getScope ( ) . getTransaction ( ) ;
75+ } ;
76+
7177export const instrumentRoutePerformance = < T extends RouteConstructor > ( BaseRoute : T ) : T => {
7278 // eslint-disable-next-line @typescript-eslint/no-explicit-any
7379 const instrumentFunction = async < X extends ( ...args : unknown [ ] ) => any > (
You can’t perform that action at this time.
0 commit comments