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
},

0 commit comments

Comments
 (0)