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 @@ -161,8 +161,8 @@ const FETCH_INTEGRATION_DIFFERS = [
// `@sentry/bun` creates `http.server` spans with `bunHttpServerIntegration`, not `httpIntegration`,
// so the incoming-request options that the scenario passes to `httpIntegration` (for example
// `sessionFlushingDelayMS`, `onSpanCreated`, `ignoreIncomingRequests`, `ignoreStaticAssets`) have
// no effect. Its spans also differ: the origin is `auto.http.server`, not `auto.http.http_server`,
// response headers become attributes, and there is no `http.response.status_text`. And a server
// no effect. Its spans also differ: response headers become attributes, and there is no
// `http.response.status_text`. And a server
// that sets `emit` back to the `emit` it had before its first request gets no spans after that.
const HTTP_SERVER_OPTIONS_IGNORED = [
'suites/sessions/exited-session-aggregate/test.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/test/integrations/bunHttpServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Bun HTTP Server Integration', () => {
// No router resolves a route here, so with span streaming the name is the request method.
expect(span?.name).toBe('GET');
expect(span?.attributes['url.path']).toBe('/users');
expect(span?.attributes['sentry.origin']).toBe('auto.http.server');
expect(span?.attributes['sentry.origin']).toBe('auto.http.http_server');
});

test('creates an http.server span for incoming QUERY requests', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/integrations/http/server-subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function buildServerSpanWrap(
attributes: {
// Sentry-specific attributes
[SENTRY_OP]: HTTP_SERVER,
[SENTRY_ORIGIN]: 'auto.http.server',
[SENTRY_ORIGIN]: 'auto.http.http_server',
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
[SENTRY_KIND]: 'server',
// Network attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ describe('getHttpServerSubscriptions', () => {
expect(transaction.contexts?.trace).toEqual(
expect.objectContaining({
op: 'http.server',
origin: 'auto.http.server',
origin: 'auto.http.http_server',
data: expect.objectContaining({
'http.request.method': 'GET',
'http.response.status_code': 200,
'sentry.kind': 'server',
'sentry.op': 'http.server',
'sentry.origin': 'auto.http.server',
'sentry.origin': 'auto.http.http_server',
'sentry.segment.name.source': 'url',
[URL_FULL]: expect.stringMatching(/\/users\/42\?foo=bar$/),
[URL_PATH]: '/users/42',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ describe('processHttpServerTransactionEvent', () => {
contexts: { trace: { origin: 'auto.http.deno', data: { 'http.response.status_code': 404 } } },
} as Event;
// Would be dropped without the gate; the origin does not match, so it passes through.
expect(processHttpServerTransactionEvent(event, [404], 'auto.http.server')).toBe(event);
expect(processHttpServerTransactionEvent(event, [404], 'auto.http.http_server')).toBe(event);
});

it('acts on events whose span origin matches', () => {
const event = {
...transaction(404),
contexts: { trace: { origin: 'auto.http.server', data: { 'http.response.status_code': 404 } } },
contexts: { trace: { origin: 'auto.http.http_server', data: { 'http.response.status_code': 404 } } },
} as Event;
expect(processHttpServerTransactionEvent(event, [404], 'auto.http.server')).toBeNull();
expect(processHttpServerTransactionEvent(event, [404], 'auto.http.http_server')).toBeNull();
});

it('acts on every origin when spanOrigin is omitted', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/deno/src/integrations/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const _denoHttpIntegration = ((options: DenoHttpIntegrationOptions = {}) => {
processEvent(event: Event): Event | null {
// Gated on this integration's own span origin so it does not filter `Deno.serve`
// transactions, which `denoServeIntegration` owns via its own `ignoreStatusCodes`.
return processHttpServerTransactionEvent(event, ignoreStatusCodes, 'auto.http.server');
return processHttpServerTransactionEvent(event, ignoreStatusCodes, 'auto.http.http_server');
},
setupOnce() {
const { [HTTP_ON_SERVER_REQUEST]: onHttpServerRequest } = getHttpServerSubscriptions({
Expand Down
Loading