@@ -6,6 +6,7 @@ import { getGlobalObject, logger, stripUrlQueryAndFragment, timestampWithMs } fr
6
6
import { Observable , Subscription } from 'rxjs' ;
7
7
import { filter , tap } from 'rxjs/operators' ;
8
8
9
+ import { ANGULAR_INIT_OP , ANGULAR_OP , ANGULAR_ROUTING_OP } from './constants' ;
9
10
import { runOutsideAngular } from './zone' ;
10
11
11
12
let instrumentationInitialized : boolean ;
@@ -83,7 +84,7 @@ export class TraceService implements OnDestroy {
83
84
}
84
85
this . _routingSpan = activeTransaction . startChild ( {
85
86
description : `${ navigationEvent . url } ` ,
86
- op : `angular.routing` ,
87
+ op : ANGULAR_ROUTING_OP ,
87
88
tags : {
88
89
'routing.instrumentation' : '@sentry/angular' ,
89
90
url : strippedUrl ,
@@ -146,7 +147,7 @@ export class TraceDirective implements OnInit, AfterViewInit {
146
147
if ( activeTransaction ) {
147
148
this . _tracingSpan = activeTransaction . startChild ( {
148
149
description : `<${ this . componentName } >` ,
149
- op : `angular.initialize` ,
150
+ op : ANGULAR_INIT_OP ,
150
151
} ) ;
151
152
}
152
153
}
@@ -187,7 +188,7 @@ export function TraceClassDecorator(): ClassDecorator {
187
188
if ( activeTransaction ) {
188
189
tracingSpan = activeTransaction . startChild ( {
189
190
description : `<${ target . name } >` ,
190
- op : `angular.initialize` ,
191
+ op : ANGULAR_INIT_OP ,
191
192
} ) ;
192
193
}
193
194
if ( originalOnInit ) {
@@ -224,7 +225,7 @@ export function TraceMethodDecorator(): MethodDecorator {
224
225
activeTransaction . startChild ( {
225
226
description : `<${ target . constructor . name } >` ,
226
227
endTimestamp : now ,
227
- op : `angular .${ String ( propertyKey ) } ` ,
228
+ op : `${ ANGULAR_OP } .${ String ( propertyKey ) } ` ,
228
229
startTimestamp : now ,
229
230
} ) ;
230
231
}
0 commit comments