Skip to content

Commit 6f6d975

Browse files
fix(tracing): align span operations to new operations (#5891)
Signed-off-by: Outsider <[email protected]> Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent c9a6a7c commit 6f6d975

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

packages/integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ sentryTest('should capture a FID vital.', async ({ browserName, getLocalTestPath
2424
const fidSpan = eventData.spans?.filter(({ description }) => description === 'first input delay')[0];
2525

2626
expect(fidSpan).toBeDefined();
27-
expect(fidSpan?.op).toBe('web.vitals');
27+
expect(fidSpan?.op).toBe('ui.action');
2828
expect(fidSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
2929
});

packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ conditionalTest({ min: 12 })('GraphQL/Apollo Tests', () => {
2121
spans: [
2222
{
2323
description: 'execute',
24-
op: 'db.graphql',
24+
op: 'graphql.execute',
2525
parent_span_id: parentSpanId,
2626
},
2727
{
2828
description: 'Query.hello',
29-
op: 'db.graphql.apollo',
29+
op: 'graphql.resolve',
3030
parent_span_id: graphqlSpanId,
3131
},
3232
],

packages/node-integration-tests/suites/tracing/prisma-orm/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ conditionalTest({ min: 12 })('Prisma ORM Integration', () => {
88
assertSentryTransaction(envelope[2], {
99
transaction: 'Test Transaction',
1010
spans: [
11-
{ description: 'User create', op: 'db.prisma' },
12-
{ description: 'User findMany', op: 'db.prisma' },
13-
{ description: 'User deleteMany', op: 'db.prisma' },
11+
{ description: 'User create', op: 'db.sql.prisma' },
12+
{ description: 'User findMany', op: 'db.sql.prisma' },
13+
{ description: 'User deleteMany', op: 'db.sql.prisma' },
1414
],
1515
});
1616
});

packages/tracing/src/browser/metrics/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export function addPerformanceEntries(transaction: Transaction): void {
221221
_startChild(transaction, {
222222
description: 'first input delay',
223223
endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),
224-
op: 'web.vitals',
224+
op: 'ui.action',
225225
startTimestamp: fidMark.value,
226226
});
227227

@@ -366,7 +366,7 @@ export function _addResourceSpans(
366366
_startChild(transaction, {
367367
description: resourceName,
368368
endTimestamp,
369-
op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource',
369+
op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',
370370
startTimestamp,
371371
data,
372372
});

packages/tracing/src/integrations/node/apollo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function wrapResolver(
9999
const parentSpan = scope?.getSpan();
100100
const span = parentSpan?.startChild({
101101
description: `${resolverGroupName}.${resolverName}`,
102-
op: 'db.graphql.apollo',
102+
op: 'graphql.resolve',
103103
});
104104

105105
const rv = orig.call(this, ...args);

packages/tracing/src/integrations/node/express.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function wrap(fn: Function, method: Method): (...args: any[]) => void {
140140
if (transaction) {
141141
const span = transaction.startChild({
142142
description: fn.name,
143-
op: `express.middleware.${method}`,
143+
op: `middleware.express.${method}`,
144144
});
145145
res.once('finish', () => {
146146
span.finish();

packages/tracing/src/integrations/node/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class GraphQL implements Integration {
3434

3535
const span = parentSpan?.startChild({
3636
description: 'execute',
37-
op: 'db.graphql',
37+
op: 'graphql.execute',
3838
});
3939

4040
scope?.setSpan(span);

packages/tracing/src/integrations/node/prisma.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class Prisma implements Integration {
8989

9090
const span = parentSpan?.startChild({
9191
description: model ? `${model} ${action}` : action,
92-
op: 'db.prisma',
92+
op: 'db.sql.prisma',
9393
});
9494

9595
const rv = next(params);

packages/tracing/test/browser/metrics/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ describe('_addResourceSpans', () => {
101101
const table = [
102102
{
103103
initiatorType: undefined,
104-
op: 'resource',
104+
op: 'resource.other',
105105
},
106106
{
107107
initiatorType: '',
108-
op: 'resource',
108+
op: 'resource.other',
109109
},
110110
{
111111
initiatorType: 'css',

packages/tracing/test/integrations/apollo.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('setupOnce', () => {
8686
expect(scope.getSpan).toBeCalled();
8787
expect(parentSpan.startChild).toBeCalledWith({
8888
description: 'Query.res_1',
89-
op: 'db.graphql.apollo',
89+
op: 'graphql.resolve',
9090
});
9191
expect(childSpan.finish).toBeCalled();
9292
});
@@ -96,7 +96,7 @@ describe('setupOnce', () => {
9696
expect(scope.getSpan).toBeCalled();
9797
expect(parentSpan.startChild).toBeCalledWith({
9898
description: 'Mutation.res_2',
99-
op: 'db.graphql.apollo',
99+
op: 'graphql.resolve',
100100
});
101101
expect(childSpan.finish).toBeCalled();
102102
});

packages/tracing/test/integrations/graphql.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('setupOnce', () => {
4848
expect(scope.getSpan).toBeCalled();
4949
expect(parentSpan.startChild).toBeCalledWith({
5050
description: 'execute',
51-
op: 'db.graphql',
51+
op: 'graphql.execute',
5252
});
5353
expect(childSpan.finish).toBeCalled();
5454
expect(scope.setSpan).toHaveBeenCalledTimes(2);

packages/tracing/test/integrations/node/prisma.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('setupOnce', function () {
5252
expect(scope.getSpan).toBeCalled();
5353
expect(parentSpan.startChild).toBeCalledWith({
5454
description: 'user create',
55-
op: 'db.prisma',
55+
op: 'db.sql.prisma',
5656
});
5757
expect(childSpan.finish).toBeCalled();
5858
done();

0 commit comments

Comments
 (0)