Skip to content

Commit 83b1506

Browse files
committed
fixes...
1 parent 4319ea4 commit 83b1506

File tree

30 files changed

+39
-138
lines changed

30 files changed

+39
-138
lines changed

dev-packages/e2e-tests/test-applications/sveltekit/test/performance.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ test('sends a pageload transaction', async ({ page }) => {
2222
origin: 'auto.pageload.sveltekit',
2323
},
2424
},
25-
tags: {
26-
'routing.instrumentation': '@sentry/sveltekit',
27-
},
2825
});
2926
});
3027

dev-packages/node-integration-tests/suites/tracing-experimental/nestjs/scenario.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ setInterval(() => {}, 1000);
2121

2222
@Injectable()
2323
class AppService {
24-
getHello(): string {
25-
return 'Hello World!';
26-
}
24+
return;
25+
'Hello World!';
26+
}
2727
}
2828

2929
@Controller()

packages/bun/test/integrations/bunserver.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ describe('Bun Serve Integration', () => {
2525
test('generates a transaction around a request', async () => {
2626
client.on('finishTransaction', transaction => {
2727
expect(transaction.status).toBe('ok');
28-
// eslint-disable-next-line deprecation/deprecation
29-
expect(transaction.tags).toEqual({
28+
expect(spanToJSON(transaction).data).toEqual({
3029
'http.status_code': '200',
3130
});
3231
expect(spanToJSON(transaction).op).toEqual('http.server');
@@ -48,8 +47,7 @@ describe('Bun Serve Integration', () => {
4847
test('generates a post transaction', async () => {
4948
client.on('finishTransaction', transaction => {
5049
expect(transaction.status).toBe('ok');
51-
// eslint-disable-next-line deprecation/deprecation
52-
expect(transaction.tags).toEqual({
50+
expect(spanToJSON(transaction).data).toEqual({
5351
'http.status_code': '200',
5452
});
5553
expect(spanToJSON(transaction).op).toEqual('http.server');

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,8 @@ export function _instrumentEmberRouter(
116116
origin: 'auto.pageload.ember',
117117
attributes: {
118118
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
119-
},
120-
tags: {
121119
url,
122120
toRoute: routeInfo.name,
123-
'routing.instrumentation': '@sentry/ember',
124121
},
125122
});
126123
}
@@ -146,11 +143,8 @@ export function _instrumentEmberRouter(
146143
origin: 'auto.navigation.ember',
147144
attributes: {
148145
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
149-
},
150-
tags: {
151146
fromRoute,
152147
toRoute,
153-
'routing.instrumentation': '@sentry/ember',
154148
},
155149
});
156150

packages/ember/tests/acceptance/sentry-performance-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module('Acceptance | Sentry Performance', function (hooks) {
2121
'ui.ember.component.render | component:test-section',
2222
],
2323
transaction: 'route:tracing',
24-
tags: {
24+
attributes: {
2525
fromRoute: undefined,
2626
toRoute: 'tracing',
2727
},
@@ -50,7 +50,7 @@ module('Acceptance | Sentry Performance', function (hooks) {
5050
],
5151
transaction: 'route:slow-loading-route.index',
5252
durationCheck: duration => duration > SLOW_TRANSITION_WAIT,
53-
tags: {
53+
attributes: {
5454
fromRoute: 'tracing',
5555
toRoute: 'slow-loading-route.index',
5656
},

packages/ember/tests/helpers/utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function assertSentryTransactions(
5151
options: {
5252
spans: string[];
5353
transaction: string;
54-
tags: Record<string, string | undefined>;
54+
attributes: Record<string, string | undefined>;
5555
durationCheck?: (duration: number) => boolean;
5656
},
5757
): void {
@@ -83,8 +83,10 @@ export function assertSentryTransactions(
8383
assert.deepEqual(filteredSpans, options.spans, 'Has correct spans');
8484

8585
assert.equal(event.transaction, options.transaction);
86-
assert.equal(event.tags?.fromRoute, options.tags.fromRoute);
87-
assert.equal(event.tags?.toRoute, options.tags.toRoute);
86+
87+
Object.keys(options.attributes).forEach(key => {
88+
assert.equal(event.contexts?.trace?.data?.[key], options.attributes[key]);
89+
});
8890

8991
if (options.durationCheck && event.timestamp && event.start_timestamp) {
9092
const duration = (event.timestamp - event.start_timestamp) * 1000;

packages/nextjs/src/client/routing/appRouterRoutingInstrumentation.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import { addFetchInstrumentationHandler, browserPerformanceTimeOrigin } from '@s
99

1010
type StartSpanCb = (context: StartSpanOptions) => void;
1111

12-
const DEFAULT_TAGS = {
13-
'routing.instrumentation': 'next-app-router',
14-
} as const;
15-
1612
/**
1713
* Instruments the Next.js Client App Router.
1814
*/
@@ -29,7 +25,6 @@ export function appRouterInstrumentation(
2925
if (shouldInstrumentPageload) {
3026
startPageloadSpanCallback({
3127
name: currPathname,
32-
tags: DEFAULT_TAGS,
3328
// pageload should always start at timeOrigin (and needs to be in s, not ms)
3429
startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,
3530
attributes: {
@@ -64,11 +59,8 @@ export function appRouterInstrumentation(
6459

6560
startNavigationSpanCallback({
6661
name: newPathname,
67-
tags: {
68-
...DEFAULT_TAGS,
69-
from: currPathname,
70-
},
7162
attributes: {
63+
from: currPathname,
7264
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
7365
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.nextjs.app_router_instrumentation',
7466
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',

packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ function extractNextDataTagInformation(): NextDataTagInfo {
9797
return nextDataTagInfo;
9898
}
9999

100-
const DEFAULT_TAGS = {
101-
'routing.instrumentation': 'next-pages-router',
102-
} as const;
103-
104100
/**
105101
* Instruments the Next.js pages router. Only supported for
106102
* client side routing. Works for Next >= 10.
@@ -123,7 +119,6 @@ export function pagesRouterInstrumentation(
123119
const client = getClient();
124120
startPageloadSpanCallback({
125121
name: prevLocationName,
126-
tags: DEFAULT_TAGS,
127122
// pageload should always start at timeOrigin (and needs to be in s, not ms)
128123
startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,
129124
traceId,
@@ -159,11 +154,8 @@ export function pagesRouterInstrumentation(
159154

160155
startNavigationSpanCallback({
161156
name: newLocation,
162-
tags: {
163-
...DEFAULT_TAGS,
164-
from: prevLocationName,
165-
},
166157
attributes: {
158+
from: prevLocationName,
167159
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
168160
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.nextjs.pages_router_instrumentation',
169161
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: spanSource,

packages/nextjs/test/integration/test/client/tracingNavigate.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test('should report navigation transactions', async ({ page }) => {
3131
contexts: {
3232
trace: {
3333
op: 'navigation',
34-
tags: {
34+
data: {
3535
from: '/[id]/withInitialProps',
3636
},
3737
},
@@ -51,7 +51,7 @@ test('should report navigation transactions', async ({ page }) => {
5151
contexts: {
5252
trace: {
5353
op: 'navigation',
54-
tags: {
54+
data: {
5555
from: '/[id]/withServerSideProps',
5656
},
5757
},

packages/nextjs/test/integration/test/server/cjsApiEndpoints.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('CommonJS API Endpoints', () => {
1717
trace: {
1818
op: 'http.server',
1919
status: 'ok',
20-
tags: { 'http.status_code': '200' },
2120
data: {
2221
'http.response.status_code': 200,
2322
},
@@ -53,7 +52,6 @@ describe('CommonJS API Endpoints', () => {
5352
trace: {
5453
op: 'http.server',
5554
status: 'ok',
56-
tags: { 'http.status_code': '200' },
5755
data: {
5856
'http.response.status_code': 200,
5957
},
@@ -89,7 +87,6 @@ describe('CommonJS API Endpoints', () => {
8987
trace: {
9088
op: 'http.server',
9189
status: 'ok',
92-
tags: { 'http.status_code': '200' },
9390
data: {
9491
'http.response.status_code': 200,
9592
},

packages/nextjs/test/integration/test/server/errorApiEndpoint.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ describe('Error API Endpoints', () => {
4444
trace: {
4545
op: 'http.server',
4646
status: 'internal_error',
47-
tags: { 'http.status_code': '500' },
4847
data: {
4948
'http.response.status_code': 500,
5049
},

packages/nextjs/test/integration/test/server/tracing200.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ describe('Tracing 200', () => {
1515
trace: {
1616
op: 'http.server',
1717
status: 'ok',
18-
tags: { 'http.status_code': '200' },
1918
data: {
2019
'http.response.status_code': 200,
2120
},

packages/nextjs/test/integration/test/server/tracing500.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ describe('Tracing 500', () => {
1515
trace: {
1616
op: 'http.server',
1717
status: 'internal_error',
18-
tags: { 'http.status_code': '500' },
1918
data: {
2019
'http.response.status_code': 500,
2120
},

packages/nextjs/test/integration/test/server/tracingHttp.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('Tracing HTTP', () => {
1919
trace: {
2020
op: 'http.server',
2121
status: 'ok',
22-
tags: { 'http.status_code': '200' },
2322
data: {
2423
'http.response.status_code': 200,
2524
},
@@ -30,7 +29,6 @@ describe('Tracing HTTP', () => {
3029
description: 'GET http://example.com/',
3130
op: 'http.client',
3231
status: 'ok',
33-
tags: { 'http.status_code': '200' },
3432
data: {
3533
'http.response.status_code': 200,
3634
},

packages/nextjs/test/performance/appRouterInstrumentation.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,11 @@ describe('appRouterInstrumentation', () => {
8484
expect(mockStartNavigationSpan).toHaveBeenCalledWith({
8585
name: '/some/server/component/page',
8686
attributes: {
87+
from: '/some/server/component/page',
8788
'sentry.op': 'navigation',
8889
'sentry.origin': 'auto.navigation.nextjs.app_router_instrumentation',
8990
'sentry.source': 'url',
9091
},
91-
tags: {
92-
from: '/some/server/component/page',
93-
'routing.instrumentation': 'next-app-router',
94-
},
9592
});
9693
});
9794

packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ describe('pagesRouterInstrumentation', () => {
243243
expect.objectContaining({
244244
name: expectedTransactionName,
245245
attributes: {
246+
from: '/home',
246247
'sentry.op': 'navigation',
247248
'sentry.origin': 'auto.navigation.nextjs.pages_router_instrumentation',
248249
'sentry.source': expectedTransactionSource,

packages/remix/src/client/performance.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ export type RemixBrowserTracingIntegrationOptions = Partial<Parameters<typeof or
4343
useMatches?: UseMatches;
4444
};
4545

46-
const DEFAULT_TAGS = {
47-
'routing.instrumentation': 'remix-router',
48-
} as const;
49-
5046
let _useEffect: UseEffect | undefined;
5147
let _useLocation: UseLocation | undefined;
5248
let _useMatches: UseMatches | undefined;
@@ -77,7 +73,6 @@ export function startPageloadSpan(): void {
7773
name: initPathName,
7874
op: 'pageload',
7975
origin: 'auto.pageload.remix',
80-
tags: DEFAULT_TAGS,
8176
attributes: {
8277
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
8378
},
@@ -102,7 +97,6 @@ function startNavigationSpan(matches: RouteMatch<string>[]): void {
10297
name: matches[matches.length - 1].id,
10398
op: 'navigation',
10499
origin: 'auto.navigation.remix',
105-
tags: DEFAULT_TAGS,
106100
attributes: {
107101
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
108102
},

packages/remix/test/integration/test/client/capture-exception.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ test('should report a manually captured error.', async ({ page }) => {
1919
]);
2020

2121
expect(pageloadEnvelope.contexts?.trace.op).toBe('pageload');
22-
expect(pageloadEnvelope.tags?.['routing.instrumentation']).toBe('remix-router');
2322
expect(pageloadEnvelope.type).toBe('transaction');
2423
expect(pageloadEnvelope.transaction).toBe('routes/capture-exception');
2524
});

packages/remix/test/integration/test/client/capture-message.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ test('should report a manually captured message.', async ({ page }) => {
1212
expect(messageEnvelope.message).toBe('Sentry Manually Captured Message');
1313

1414
expect(pageloadEnvelope.contexts?.trace.op).toBe('pageload');
15-
expect(pageloadEnvelope.tags?.['routing.instrumentation']).toBe('remix-router');
1615
expect(pageloadEnvelope.type).toBe('transaction');
1716
expect(pageloadEnvelope.transaction).toBe('routes/capture-message');
1817
});

packages/remix/test/integration/test/client/errorboundary.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ test('should capture React component errors.', async ({ page }) => {
1212
const [pageloadEnvelope, errorEnvelope] = envelopes;
1313

1414
expect(pageloadEnvelope.contexts?.trace?.op).toBe('pageload');
15-
expect(pageloadEnvelope.tags?.['routing.instrumentation']).toBe('remix-router');
1615
expect(pageloadEnvelope.type).toBe('transaction');
1716
expect(pageloadEnvelope.transaction).toBe(
1817
useV2 ? 'routes/error-boundary-capture.$id' : 'routes/error-boundary-capture/$id',

packages/remix/test/integration/test/client/manualtracing.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ test('should report a manually created / finished transaction.', async ({ page }
1717
expect(manualTransactionEnvelope.timestamp).toBeDefined();
1818

1919
expect(pageloadEnvelope.contexts?.trace?.op).toBe('pageload');
20-
expect(pageloadEnvelope.tags?.['routing.instrumentation']).toBe('remix-router');
2120
expect(pageloadEnvelope.type).toBe('transaction');
2221
expect(pageloadEnvelope.transaction).toBe(useV2 ? 'routes/manual-tracing.$id' : 'routes/manual-tracing/$id');
2322
});

packages/remix/test/integration/test/client/pageload.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ test('should add `pageload` transaction on load.', async ({ page }) => {
88
const envelope = await getFirstSentryEnvelopeRequest<Event>(page, '/');
99

1010
expect(envelope.contexts?.trace.op).toBe('pageload');
11-
expect(envelope.tags?.['routing.instrumentation']).toBe('remix-router');
1211
expect(envelope.type).toBe('transaction');
1312

1413
expect(envelope.transaction).toBe(useV2 ? 'root' : 'routes/index');

0 commit comments

Comments
 (0)