Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev-packages/bun-integration-tests/node-suites/excludes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const NO_HTTP_SERVER_SPANS = [
'suites/tracing/envelope-header/sampleRate-propagation/test.ts',
'suites/tracing/httpIntegration-streamed/test.ts',
'suites/tracing/httpIntegration/test.ts',
'suites/tracing/httpServerSpans-streamed-unrouted/test.ts',
'suites/tracing/httpServerSpans-unrouted/test.ts',
'suites/tracing/ignoreSpans-streamed/**',
'suites/tracing/meta-tags-twp-errors/test.ts',
'suites/tracing/meta-tags/test.ts',
'suites/tracing/requestData-streamed/test.ts',
'suites/tracing/requestData/test.ts',
'suites/tracing/sample-rand-propagation/test.ts',
'suites/tracing/sample-rate-propagation/**',
'suites/tracing/sampling-static/test.ts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
transport: loggingTransport,
traceLifecycle: 'stream',
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
traceLifecycle: 'static',
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracesSampleRate: 1.0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { HTTP_SERVER } from '@sentry/conventions/op';
import { createTestServer } from '@sentry-internal/test-utils';
import { URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
import { HTTP_RESPONSE_STATUS_CODE, SENTRY_OP, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
import { afterAll, describe, expect, test } from 'vitest';
import { cleanupChildProcesses, createEsmAndCjsTests, createRunner } from '../../../utils/runner';
import { RUNTIME } from '../../../utils';
Expand Down Expand Up @@ -205,51 +206,54 @@ describe('httpIntegration', () => {
test('handles server.emit being overwritten via classic monkey patching', async () => {
const runner = createRunner()
.expect({
transaction: {
transaction: 'GET /test1',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test1' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test2',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test2' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test3',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test3' },
},
},
},
spans: [],
],
},
})
.start();
Expand All @@ -263,50 +267,54 @@ describe('httpIntegration', () => {
test('handles server.emit being overwritten via proxy', async () => {
const runner = createRunner()
.expect({
transaction: {
transaction: 'GET /test1-proxy',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test1-proxy' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test2-proxy',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test2-proxy' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test3-proxy',
contexts: {
trace: {
span: {
items: expect.arrayContaining([
expect.objectContaining({
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
},
},
},
attributes: expect.objectContaining({
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test3-proxy' },
}),
}),
]),
},
})
.start();
Expand All @@ -320,51 +328,54 @@ describe('httpIntegration', () => {
test('handles server.emit being overwritten via classic monkey patching, using initial server.emit', async () => {
const runner = createRunner()
.expect({
transaction: {
transaction: 'GET /test1-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test1-original' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test2-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test2-original' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test3-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test3-original' },
},
},
},
spans: [],
],
},
})
.start();
Expand All @@ -378,51 +389,54 @@ describe('httpIntegration', () => {
test('handles server.emit being overwritten via proxy, using initial server.emit', async () => {
const runner = createRunner()
.expect({
transaction: {
transaction: 'GET /test1-proxy-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test1-proxy-original' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test2-proxy-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test2-proxy-original' },
},
},
},
spans: [],
],
},
})
.expect({
transaction: {
transaction: 'GET /test3-proxy-original',
contexts: {
trace: {
span: {
items: [
{
name: 'GET',
is_segment: true,
span_id: expect.stringMatching(/[a-f\d]{16}/),
trace_id: expect.stringMatching(/[a-f\d]{32}/),
data: {
'http.response.status_code': 200,
'sentry.op': 'http.server',
attributes: {
[HTTP_RESPONSE_STATUS_CODE]: { type: 'integer', value: 200 },
[SENTRY_OP]: { type: 'string', value: HTTP_SERVER },
[URL_PATH]: { type: 'string', value: '/test3-proxy-original' },
},
},
},
spans: [],
],
},
})
.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
transport: loggingTransport,
traceLifecycle: 'stream',
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterAll, describe, expect } from 'vitest';
import { cleanupChildProcesses, createEsmAndCjsTests } from '../../../utils/runner';

describe('httpServerSpans-streamed (no route)', () => {
describe('httpServerSpans (no route)', () => {
afterAll(() => {
cleanupChildProcesses();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
transport: loggingTransport,
traceLifecycle: 'stream',
dataCollection: {
userInfo: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ Sentry.init({
release: '1.0',
tracesSampleRate: 1.0,
transport: loggingTransport,
traceLifecycle: 'stream',
integrations: defaults => defaults.filter(i => i.name !== 'RequestData'),
});
Loading
Loading