Skip to content

Commit

Permalink
fix more otel/node-experimental tests
Browse files Browse the repository at this point in the history
fix missing eslint ignore after rebase :(

migration doc

revert next-env.d.ts change

once again fix things after rebasing :(
  • Loading branch information
Lms24 committed Jan 17, 2024
1 parent af67b4b commit bfdd5a6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
- `span.setData()`: Use `span.setAttribute()` instead.
- `span.instrumenter` This field was removed and will be replaced internally.
- `span.transaction`: Use `getRootSpan` utility function instead.
- `span.op`: Use `startSpan` functions to set, `setAttribute()` to update and `spanToJSON` to read the span operation.
- `transaction.setMetadata()`: Use attributes instead, or set data on the scope.
- `transaction.metadata`: Use attributes instead, or set data on the scope.
- `transaction.setContext()`: Set context on the surrounding scope instead.
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/test/integration/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Integration | Transactions', () => {
},
runtime: { name: 'node', version: expect.any(String) },
trace: {
data: { 'otel.kind': 'INTERNAL' },
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
op: 'test op',
span_id: expect.any(String),
status: 'ok',
Expand Down Expand Up @@ -244,7 +244,7 @@ describe('Integration | Transactions', () => {
},
}),
trace: {
data: { 'otel.kind': 'INTERNAL' },
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
op: 'test op',
span_id: expect.any(String),
status: 'ok',
Expand Down Expand Up @@ -286,7 +286,7 @@ describe('Integration | Transactions', () => {
},
}),
trace: {
data: { 'otel.kind': 'INTERNAL' },
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op b' },
op: 'test op b',
span_id: expect.any(String),
status: 'ok',
Expand Down Expand Up @@ -363,7 +363,7 @@ describe('Integration | Transactions', () => {
attributes: {},
}),
trace: {
data: { 'otel.kind': 'INTERNAL' },
data: { 'otel.kind': 'INTERNAL', 'sentry.op': 'test op' },
op: 'test op',
span_id: expect.any(String),
parent_span_id: parentSpanId,
Expand Down
1 change: 1 addition & 0 deletions packages/node/test/integrations/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('tracing', () => {

// our span is at index 1 because the transaction itself is at index 0
expect(spanToJSON(spans[1]).description).toEqual('GET http://dogs.are.great/');
// eslint-disable-next-line deprecation/deprecation
expect(spans[1].op).toEqual('http.client');
expect(spanToJSON(spans[1]).op).toEqual('http.client');
});
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-node/test/spanprocessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ describe('SentrySpanProcessor', () => {
'http.url': 'http://example.com/my/route/123',
'otel.kind': 'INTERNAL',
url: 'http://example.com/my/route/123',
'sentry.op': 'http',
});

parentOtelSpan.end();
Expand Down
1 change: 1 addition & 0 deletions packages/tracing-internal/src/browser/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export function addPerformanceEntries(transaction: Transaction): void {
const startTime = msToSec(entry.startTime);
const duration = msToSec(entry.duration);

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

0 comments on commit bfdd5a6

Please sign in to comment.