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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

Work in this release was contributed by @faizansaiyed123, @seongwon030, and @kyrylolvov. Thank you for your contributions!
Work in this release was contributed by @faizansaiyed123, @itisrmk, @seongwon030, and @kyrylolvov. Thank you for your contributions!

## 11.9.0

Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@sentry/browser": "11.9.0",
"@sentry/replay": "11.9.0",
"@sentry/opentelemetry": "11.9.0",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@supabase/supabase-js": "2.109.0",
"axios": "1.20.0",
"babel-loader": "^10.1.1",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/cloudflare-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@cloudflare/workers-types-v5": "npm:@cloudflare/workers-types@5.20260710.1",
"@opentelemetry/api": "^1.9.1",
"@sentry-internal/test-utils": "11.9.0",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"eslint-plugin-regexp": "^3.1.0",
"prisma": "6.15.0",
"vite": "^8.3.1",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/deno-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@sentry-internal/node-integration-tests": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"vitest": "^4.1.11"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@playwright/test": "1.64.1",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/jasmine": "~5.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@cloudflare/workers-types": "^4.20260426.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"typescript": "^5.5.2",
"vite": "7.3.5",
"wrangler": "^4.136.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@cloudflare/workers-types": "^5.20260727.1",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@types/node": "^26.1.2",
"sentry": "~0.44.1",
"typescript": "~6.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry/core": "latest || *",
"nitro": "^3.0.260522-beta",
"rolldown": "latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/node": "24.x",
"typescript": "~5.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry/conventions": "0.29.0",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test';
import { HAPI_EXT_TYPE, HAPI_TYPE, SERVER_EXT_TYPE } from '@sentry/conventions/attributes';
import { waitForStreamedSpan, getSpanOp, collectStreamedSpansUntilSegment } from '@sentry-internal/test-utils';

test('Sends successful span', async ({ baseURL }) => {
Expand Down Expand Up @@ -97,10 +98,12 @@ test('Sends successful span', async ({ baseURL }) => {
end_timestamp: expect.any(Number),
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
attributes: expect.objectContaining({
'hapi.type': { value: 'server.ext', type: 'string' },
[HAPI_TYPE]: { value: 'server.ext', type: 'string' },
[HAPI_EXT_TYPE]: { value: 'onPreResponse', type: 'string' },
'sentry.op': { value: 'middleware', type: 'string' },
'sentry.origin': { value: 'auto.http.hapi', type: 'string' },
'server.ext.type': { value: 'onPreResponse', type: 'string' },
// oxlint-disable-next-line typescript/no-deprecated
[SERVER_EXT_TYPE]: { value: 'onPreResponse', type: 'string' },
}),
}),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@types/node": "24.x",
"mastra": "~1.28.0",
"typescript": "~5.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@types/express": "^4.17.21",
"@types/node": "^24.0.0",
"sentry": "~0.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/node": "24.x"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@neondatabase/serverless": "1.2.0",
"@opentelemetry/instrumentation-http": "0.220.0",
"@sentry-internal/rollup-utils": "11.9.0",
"@sentry/conventions": "0.27.0",
"@sentry/conventions": "0.29.0",
"@sentry-internal/test-utils": "11.9.0",
"@sentry/node-native": "11.9.0",
"@types/amqplib": "^0.10.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0',
tracesSampleRate: 1.0,
transport: loggingTransport,
traceLifecycle: 'static',
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ const run = async () => {
},
});

server.route({
method: ['GET', 'POST'],
path: '/multi',
handler: () => 'Hello World!',
});

server.route({
method: '*',
path: '/wildcard',
handler: () => 'Hello World!',
});

server.route({
method: 'GET',
path: '/error',
Expand All @@ -34,6 +46,14 @@ const run = async () => {
},
});

server.route({
method: '*',
path: '/wildcard-error',
handler: () => {
return new Error('Sentry Test Error');
},
});

server.route({
method: 'GET',
path: '/boom-error',
Expand Down
84 changes: 82 additions & 2 deletions dev-packages/node-integration-tests/suites/tracing/hapi/test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import {
HAPI_EXT_TYPE,
HAPI_TYPE,
HTTP_REQUEST_METHOD,
SENTRY_OP,
SERVER_EXT_TYPE,
} from '@sentry/conventions/attributes';
import { ROUTER } from '@sentry/conventions/op';
import { afterAll, describe, expect } from 'vitest';
import { cleanupChildProcesses, createEsmAndCjsTests } from '../../../utils/runner';

Expand All @@ -19,7 +27,36 @@ describe('hapi auto-instrumentation', () => {
},
};

const MULTI_METHOD_REQUESTS = [
{ method: 'get', path: '/multi' },
{ method: 'post', path: '/multi' },
{ method: 'put', path: '/wildcard' },
] as const;

createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument.mjs', (createRunner, test) => {
test('should record the request method for multi-method and wildcard routes.', async () => {
const runner = createRunner().unordered();
for (const { method, path } of MULTI_METHOD_REQUESTS) {
const httpMethod = method.toUpperCase();
runner.expect({
span: container => {
expect(container.items.find(item => item.is_segment)?.name).toBe(`${httpMethod} ${path}`);

const routerSpans = container.items.filter(item => item.attributes[SENTRY_OP]?.value === ROUTER);
expect(routerSpans).toHaveLength(1);
expect(routerSpans[0]?.name).toBe(path);
expect(routerSpans[0]?.attributes[HTTP_REQUEST_METHOD]).toEqual({ type: 'string', value: httpMethod });
},
});
}

const started = runner.start();
for (const { method, path } of MULTI_METHOD_REQUESTS) {
await started.makeRequest(method, path);
}
await started.completed();
});

test('should auto-instrument `@hapi/hapi` package.', async () => {
const runner = createRunner()
.expect({
Expand Down Expand Up @@ -72,8 +109,10 @@ describe('hapi auto-instrumentation', () => {
expect.objectContaining({
name: 'ext - onPreResponse',
attributes: expect.objectContaining({
'hapi.type': { type: 'string', value: 'server.ext' },
'server.ext.type': { type: 'string', value: 'onPreResponse' },
[HAPI_TYPE]: { type: 'string', value: 'server.ext' },
[HAPI_EXT_TYPE]: { type: 'string', value: 'onPreResponse' },
// oxlint-disable-next-line typescript/no-deprecated
[SERVER_EXT_TYPE]: { type: 'string', value: 'onPreResponse' },
'sentry.op': { type: 'string', value: 'middleware' },
'sentry.origin': { type: 'string', value: origin },
}),
Expand Down Expand Up @@ -114,6 +153,20 @@ describe('hapi auto-instrumentation', () => {
await runner.completed();
});

test('should assign the request method to the transactionName of errors in wildcard routes.', async () => {
const runner = createRunner()
.expect({
event: {
...EXPECTED_ERROR_EVENT,
transaction: 'PUT /wildcard-error',
},
})
.ignore('span')
.start();
runner.makeRequest('put', '/wildcard-error', { expectError: true });
await runner.completed();
});

test('should handle returned Boom errors in routes.', async () => {
const runner = createRunner()
.unordered()
Expand Down Expand Up @@ -143,6 +196,33 @@ describe('hapi auto-instrumentation', () => {
});
});

// Only static spans put the method into the router span name, which crashed for multi-method routes.
createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument-static.mjs', (createRunner, test) => {
test('should name router spans after the request method for multi-method and wildcard routes.', async () => {
const runner = createRunner().unordered();
for (const { method, path } of MULTI_METHOD_REQUESTS) {
const httpMethod = method.toUpperCase();
const spanName = `${httpMethod} ${path}`;
runner.expect({
transaction: transaction => {
expect(transaction.transaction).toBe(spanName);

const routerSpans = transaction.spans?.filter(span => span.op === ROUTER) ?? [];
expect(routerSpans).toHaveLength(1);
expect(routerSpans[0]?.description).toBe(spanName);
expect(routerSpans[0]?.data[HTTP_REQUEST_METHOD]).toBe(httpMethod);
},
});
}

const started = runner.start();
for (const { method, path } of MULTI_METHOD_REQUESTS) {
await started.makeRequest(method, path);
}
await started.completed();
});
});

// Regression test: a `setupHapiErrorHandler` call before `server.start()` installs the default
// predicate. The integration's own auto-registration (with a custom `shouldHandleError`) fires later,
// at `server.start()`, and must still win. The custom predicate drops "Dropped error" (which the
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@sentry/browser": "11.9.0",
"@sentry/core": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"tslib": "^2.4.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@sentry/browser": "11.9.0",
"@sentry/core": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"@sentry/node": "11.9.0",
"@sentry/server-runtime-injection": "11.9.0",
"@sentry/server-utils": "11.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"access": "public"
},
"dependencies": {
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"@sentry/core": "11.9.0",
"@sentry/node": "11.9.0",
"@sentry/server-runtime-injection": "11.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@sentry/core": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"web-vitals": "^6.2.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@sentry/browser-utils": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"@sentry/feedback": "11.9.0",
"@sentry/replay": "11.9.0",
"@sentry/replay-canvas": "11.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"@sentry/core": "11.9.0",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"@sentry/node": "11.9.0",
"@sentry/server-utils": "11.9.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@opentelemetry/api": "^1.9.1",
"@sentry/conventions": "^0.27.0",
"@sentry/conventions": "^0.29.0",
"@sentry/core": "11.9.0",
"@sentry/opentelemetry": "11.9.0",
"@sentry/server-utils": "11.9.0",
Expand Down
Loading
Loading