Skip to content

Commit a31f068

Browse files
committed
update angular origins
1 parent fad409b commit a31f068

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/angular/src/tracing.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function routingInstrumentation(
3939
customStartTransaction({
4040
name: WINDOW.location.pathname,
4141
op: 'pageload',
42-
origin: 'auto.http.angular',
42+
origin: 'auto.pageload.angular',
4343
metadata: { source: 'url' },
4444
});
4545
}
@@ -85,7 +85,7 @@ export class TraceService implements OnDestroy {
8585
activeTransaction = stashedStartTransaction({
8686
name: strippedUrl,
8787
op: 'navigation',
88-
origin: 'auto.http.angular',
88+
origin: 'auto.navigation.angular',
8989
metadata: { source: 'url' },
9090
});
9191
}
@@ -195,7 +195,7 @@ export class TraceDirective implements OnInit, AfterViewInit {
195195
this._tracingSpan = activeTransaction.startChild({
196196
description: `<${this.componentName}>`,
197197
op: ANGULAR_INIT_OP,
198-
origin: 'auto.ui.angular',
198+
origin: 'auto.ui.angular.trace_directive',
199199
});
200200
}
201201
}
@@ -237,7 +237,7 @@ export function TraceClassDecorator(): ClassDecorator {
237237
tracingSpan = activeTransaction.startChild({
238238
description: `<${target.name}>`,
239239
op: ANGULAR_INIT_OP,
240-
origin: 'auto.ui.angular',
240+
origin: 'auto.ui.angular.trace_class_decorator',
241241
});
242242
}
243243
if (originalOnInit) {
@@ -275,7 +275,7 @@ export function TraceMethodDecorator(): MethodDecorator {
275275
description: `<${target.constructor.name}>`,
276276
endTimestamp: now,
277277
op: `${ANGULAR_OP}.${String(propertyKey)}`,
278-
origin: 'auto.ui.angular',
278+
origin: 'auto.ui.angular.trace_method_decorator',
279279
startTimestamp: now,
280280
});
281281
}

packages/angular/test/tracing.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('Angular Tracing', () => {
4848
expect(startTransaction).toHaveBeenCalledWith({
4949
name: '/',
5050
op: 'pageload',
51-
origin: 'auto.http.angular',
51+
origin: 'auto.pageload.angular',
5252
metadata: { source: 'url' },
5353
});
5454
});
@@ -138,7 +138,7 @@ describe('Angular Tracing', () => {
138138
expect(customStartTransaction).toHaveBeenCalledWith({
139139
name: url,
140140
op: 'pageload',
141-
origin: 'auto.http.angular',
141+
origin: 'auto.pageload.angular',
142142
metadata: { source: 'url' },
143143
});
144144

@@ -329,7 +329,7 @@ describe('Angular Tracing', () => {
329329
expect(customStartTransaction).toHaveBeenCalledWith({
330330
name: url,
331331
op: 'navigation',
332-
origin: 'auto.http.angular',
332+
origin: 'auto.navigation.angular',
333333
metadata: { source: 'url' },
334334
});
335335
expect(transaction.setName).toHaveBeenCalledWith(result, 'route');
@@ -361,7 +361,7 @@ describe('Angular Tracing', () => {
361361

362362
expect(transaction.startChild).toHaveBeenCalledWith({
363363
op: 'ui.angular.init',
364-
origin: 'auto.ui.angular',
364+
origin: 'auto.ui.angular.trace_directive',
365365
description: '<unknown>',
366366
});
367367

@@ -388,7 +388,7 @@ describe('Angular Tracing', () => {
388388

389389
expect(transaction.startChild).toHaveBeenCalledWith({
390390
op: 'ui.angular.init',
391-
origin: 'auto.ui.angular',
391+
origin: 'auto.ui.angular.trace_directive',
392392
description: '<test-component>',
393393
});
394394

@@ -463,7 +463,7 @@ describe('Angular Tracing', () => {
463463
expect(transaction.startChild).toHaveBeenCalledWith({
464464
description: '<DecoratedComponent>',
465465
op: 'ui.angular.init',
466-
origin: 'auto.ui.angular',
466+
origin: 'auto.ui.angular.trace_class_decorator',
467467
});
468468

469469
expect(origNgOnInitMock).toHaveBeenCalledTimes(1);
@@ -517,15 +517,15 @@ describe('Angular Tracing', () => {
517517
expect(transaction.startChild.mock.calls[0][0]).toEqual({
518518
description: '<DecoratedComponent>',
519519
op: 'ui.angular.ngOnInit',
520-
origin: 'auto.ui.angular',
520+
origin: 'auto.ui.angular.trace_method_decorator',
521521
startTimestamp: expect.any(Number),
522522
endTimestamp: expect.any(Number),
523523
});
524524

525525
expect(transaction.startChild.mock.calls[1][0]).toEqual({
526526
description: '<DecoratedComponent>',
527527
op: 'ui.angular.ngAfterViewInit',
528-
origin: 'auto.ui.angular',
528+
origin: 'auto.ui.angular.trace_method_decorator',
529529
startTimestamp: expect.any(Number),
530530
endTimestamp: expect.any(Number),
531531
});

0 commit comments

Comments
 (0)