Skip to content

Commit 7b687f6

Browse files
committed
fix more otel/node-experimental tests
fix missing eslint ignore after rebase :( migration doc revert next-env.d.ts change once again fix things after rebasing :(
1 parent bb28c4b commit 7b687f6

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

MIGRATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
205205
- `span.transaction`: Use `getRootSpan` utility function instead.
206206
- `span.spanRecorder`: Span recording will be handled internally by the SDK.
207207
- `span.status`: Use `.setStatus` to set or update and `spanToJSON()` to read the span status.
208+
- `span.op`: Use `startSpan` functions to set, `setAttribute()` to update and `spanToJSON` to read the span operation.
208209
- `transaction.setMetadata()`: Use attributes instead, or set data on the scope.
209210
- `transaction.metadata`: Use attributes instead, or set data on the scope.
210211
- `transaction.setContext()`: Set context on the surrounding scope instead.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference types="next/navigation-types/compat/navigation" />
43

54
// NOTE: This file should not be edited
65
// see https://nextjs.org/docs/basic-features/typescript for more information.

packages/node-experimental/test/integration/transactions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('Integration | Transactions', () => {
8484
},
8585
runtime: { name: 'node', version: expect.any(String) },
8686
trace: {
87-
data: { 'otel.kind': 'INTERNAL' },
87+
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
8888
op: 'test op',
8989
span_id: expect.any(String),
9090
status: 'ok',
@@ -244,7 +244,7 @@ describe('Integration | Transactions', () => {
244244
},
245245
}),
246246
trace: {
247-
data: { 'otel.kind': 'INTERNAL' },
247+
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
248248
op: 'test op',
249249
span_id: expect.any(String),
250250
status: 'ok',
@@ -286,7 +286,7 @@ describe('Integration | Transactions', () => {
286286
},
287287
}),
288288
trace: {
289-
data: { 'otel.kind': 'INTERNAL' },
289+
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op b' },
290290
op: 'test op b',
291291
span_id: expect.any(String),
292292
status: 'ok',
@@ -363,7 +363,7 @@ describe('Integration | Transactions', () => {
363363
attributes: {},
364364
}),
365365
trace: {
366-
data: { 'otel.kind': 'INTERNAL' },
366+
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
367367
op: 'test op',
368368
span_id: expect.any(String),
369369
parent_span_id: parentSpanId,

packages/node/test/integrations/http.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ describe('tracing', () => {
7979

8080
// our span is at index 1 because the transaction itself is at index 0
8181
expect(spanToJSON(spans[1]).description).toEqual('GET http://dogs.are.great/');
82+
// eslint-disable-next-line deprecation/deprecation
8283
expect(spans[1].op).toEqual('http.client');
8384
expect(spanToJSON(spans[1]).op).toEqual('http.client');
8485
});

packages/opentelemetry-node/test/spanprocessor.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ describe('SentrySpanProcessor', () => {
560560
'http.url': 'http://example.com/my/route/123',
561561
'otel.kind': 'INTERNAL',
562562
url: 'http://example.com/my/route/123',
563+
'sentry.op': 'http',
563564
});
564565

565566
parentOtelSpan.end();

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export function addPerformanceEntries(transaction: Transaction): void {
193193
const startTime = msToSec(entry.startTime);
194194
const duration = msToSec(entry.duration);
195195

196+
// eslint-disable-next-line deprecation/deprecation
196197
if (transaction.op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {
197198
return;
198199
}

0 commit comments

Comments
 (0)