Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
12c2a6c
feat(deps): bump @sentry/cli from 2.51.1 to 2.52.0 (#17458)
dependabot[bot] Aug 26, 2025
3efcb40
feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.56.0 t…
dependabot[bot] Aug 26, 2025
fc233be
test(aws): Run E2E tests in all supported Node versions (#17446)
msonnb Aug 26, 2025
5de1b47
feat(deps): bump @prisma/instrumentation from 6.13.0 to 6.14.0 (#17466)
dependabot[bot] Aug 27, 2025
81108d3
feat(deps): bump @opentelemetry/instrumentation-mysql2 from 0.49.0 to…
dependabot[bot] Aug 27, 2025
3048f84
feat(replay): Add option to skip `requestAnimationFrame` for canvas s…
billyvg Aug 27, 2025
6cfb725
Merge branch 'develop' into manual-develop-sync
andreiborza Aug 27, 2025
018db43
Merge pull request #17468 from getsentry/manual-develop-sync
andreiborza Aug 27, 2025
a7acc8f
feat(cloudflare): Add `instrumentPrototypeMethods` option to instrume…
andreiborza Aug 27, 2025
2282ed3
feat(deps): bump @sentry/webpack-plugin from 4.1.0 to 4.1.1 (#17467)
dependabot[bot] Aug 27, 2025
359610e
feat(deps): bump @sentry/rollup-plugin from 4.1.0 to 4.1.1 (#17456)
dependabot[bot] Aug 27, 2025
647dbfe
feat(deps): bump @opentelemetry/instrumentation-kafkajs from 0.12.0 t…
dependabot[bot] Aug 27, 2025
7303ab1
feat(aws): Add support for streaming handlers (#17463)
msonnb Aug 27, 2025
6874fbe
feat(core): Stream responses Anthropic AI (#17460)
RulaKhaled Aug 27, 2025
dfc411b
feat(deps): bump @opentelemetry/instrumentation-dataloader from 0.21.…
dependabot[bot] Aug 27, 2025
0496bbe
meta(changelog): Update changelog for 10.7.0
andreiborza Aug 27, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ jobs:
- name: Build E2E app
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 7
run: pnpm ${{ matrix.build-command || 'test:build' }}
run: ${{ matrix.build-command || 'pnpm test:build' }}

- name: Install Playwright
uses: ./.github/actions/install-playwright
Expand All @@ -965,7 +965,7 @@ jobs:
- name: Run E2E test
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 10
run: pnpm test:assert
run: ${{ matrix.assert-command || 'pnpm test:assert' }}

- name: Upload Playwright Traces
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -1075,7 +1075,7 @@ jobs:
- name: Build E2E app
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 7
run: pnpm ${{ matrix.build-command || 'test:build' }}
run: ${{ matrix.build-command || 'pnpm test:build' }}

- name: Install Playwright
uses: ./.github/actions/install-playwright
Expand All @@ -1086,7 +1086,7 @@ jobs:
- name: Run E2E test
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 10
run: pnpm ${{ matrix.assert-command || 'test:assert' }}
run: ${{ matrix.assert-command || 'pnpm test:assert' }}

- name: Pre-process E2E Test Dumps
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
gzip: true,
limit: '95 KB',
limit: '96 KB',
},
{
name: '@sentry/browser (incl. Feedback)',
Expand Down Expand Up @@ -233,7 +233,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '149 KB',
limit: '150 KB',
},
{
name: '@sentry/node - without tracing',
Expand Down
56 changes: 54 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,60 @@

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

## 10.7.0

### Important Changes

- **feat(cloudflare): Add `instrumentPrototypeMethods` option to instrument RPC methods for DurableObjects ([#17424](https://github.com/getsentry/sentry-javascript/pull/17424))**

By default, `Sentry.instrumentDurableObjectWithSentry` will not wrap any RPC methods on the prototype. To enable wrapping for RPC methods, set `instrumentPrototypeMethods` to `true` or, if performance is a concern, a list of only the methods you want to instrument:

```js
class MyDurableObjectBase extends DurableObject<Env> {
method1() {
// ...
}

method2() {
// ...
}

method3() {
// ...
}
}
// Export your named class as defined in your wrangler config
export const MyDurableObject = Sentry.instrumentDurableObjectWithSentry(
(env: Env) => ({
dsn: "https://ac49b7af3017c458bd12dab9b3328bfc@o4508482761982032.ingest.de.sentry.io/4508482780987481",
tracesSampleRate: 1.0,
instrumentPrototypeMethods: ['method1', 'method3'],
}),
MyDurableObjectBase,
);
```

## Other Changes

- feat(aws): Add support for streaming handlers ([#17463](https://github.com/getsentry/sentry-javascript/pull/17463))
- feat(core): Stream responses Anthropic AI ([#17460](https://github.com/getsentry/sentry-javascript/pull/17460))
- feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.56.0 to 0.57.0 ([#17455](https://github.com/getsentry/sentry-javascript/pull/17455))
- feat(deps): bump @opentelemetry/instrumentation-dataloader from 0.21.0 to 0.21.1 ([#17457](https://github.com/getsentry/sentry-javascript/pull/17457))
- feat(deps): bump @opentelemetry/instrumentation-kafkajs from 0.12.0 to 0.13.0 ([#17469](https://github.com/getsentry/sentry-javascript/pull/17469))
- feat(deps): bump @opentelemetry/instrumentation-mysql2 from 0.49.0 to 0.50.0 ([#17459](https://github.com/getsentry/sentry-javascript/pull/17459))
- feat(deps): bump @prisma/instrumentation from 6.13.0 to 6.14.0 ([#17466](https://github.com/getsentry/sentry-javascript/pull/17466))
- feat(deps): bump @sentry/cli from 2.51.1 to 2.52.0 ([#17458](https://github.com/getsentry/sentry-javascript/pull/17458))
- feat(deps): bump @sentry/rollup-plugin from 4.1.0 to 4.1.1 ([#17456](https://github.com/getsentry/sentry-javascript/pull/17456))
- feat(deps): bump @sentry/webpack-plugin from 4.1.0 to 4.1.1 ([#17467](https://github.com/getsentry/sentry-javascript/pull/17467))
- feat(replay): Add option to skip `requestAnimationFrame` for canvas snapshots ([#17380](https://github.com/getsentry/sentry-javascript/pull/17380))

<details>
<summary> <strong>Internal Changes</strong> </summary>

- test(aws): Run E2E tests in all supported Node versions ([#17446](https://github.com/getsentry/sentry-javascript/pull/17446))

</details>

## 10.6.0

### Important Changes
Expand Down Expand Up @@ -41,8 +95,6 @@ The Sentry Nuxt SDK is now considered stable and no longer in beta!

</details>

Work in this release was contributed by @Karibash. Thank you for your contribution!

## 10.5.0

- feat(core): better cause data extraction ([#17375](https://github.com/getsentry/sentry-javascript/pull/17375))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import * as Sentry from '@sentry/cloudflare';
import { DurableObject } from 'cloudflare:workers';

interface Env {
SENTRY_DSN: string;
TEST_DURABLE_OBJECT: DurableObjectNamespace;
}

class TestDurableObjectBase extends DurableObject<Env> {
public constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
}

// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
async sayHello(name: string): Promise<string> {
return `Hello, ${name}`;
}
}

export const TestDurableObject = Sentry.instrumentDurableObjectWithSentry(
(env: Env) => ({
dsn: env.SENTRY_DSN,
tracesSampleRate: 1.0,
instrumentPrototypeMethods: true,
}),
TestDurableObjectBase,
);

export default {
async fetch(request: Request, env: Env): Promise<Response> {
const id: DurableObjectId = env.TEST_DURABLE_OBJECT.idFromName('test');
const stub = env.TEST_DURABLE_OBJECT.get(id) as unknown as TestDurableObjectBase;

if (request.url.includes('hello')) {
const greeting = await stub.sayHello('world');
return new Response(greeting);
}

return new Response('Usual response');
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { expect, it } from 'vitest';
import { createRunner } from '../../../runner';

it('traces a durable object method', async () => {
const runner = createRunner(__dirname)
.expect(envelope => {
const transactionEvent = envelope[1]?.[0]?.[1];
expect(transactionEvent).toEqual(
expect.objectContaining({
contexts: expect.objectContaining({
trace: expect.objectContaining({
op: 'rpc',
data: expect.objectContaining({
'sentry.op': 'rpc',
'sentry.origin': 'auto.faas.cloudflare_durableobjects',
}),
origin: 'auto.faas.cloudflare_durableobjects',
}),
}),
transaction: 'sayHello',
}),
);
})
.start();
await runner.makeRequest('get', '/hello');
await runner.completed();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "worker-name",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"migrations": [
{
"new_sqlite_classes": ["TestDurableObject"],
"tag": "v1"
}
],
"durable_objects": {
"bindings": [
{
"class_name": "TestDurableObject",
"name": "TEST_DURABLE_OBJECT"
}
]
},
"compatibility_flags": ["nodejs_als"],
"vars": {
"SENTRY_DSN": "https://[email protected]/4509553159831552"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,19 @@
},
"volta": {
"extends": "../../package.json"
},
"sentryTest": {
"variants": [
{
"build-command": "NODE_VERSION=20 ./pull-sam-image.sh && pnpm test:build",
"assert-command": "NODE_VERSION=20 pnpm test:assert",
"label": "aws-serverless (Node 20)"
},
{
"build-command": "NODE_VERSION=18 ./pull-sam-image.sh && pnpm test:build",
"assert-command": "NODE_VERSION=18 pnpm test:assert",
"label": "aws-serverless (Node 18)"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { getPlaywrightConfig } from '@sentry-internal/test-utils';

export default getPlaywrightConfig();
export default getPlaywrightConfig(undefined, {
timeout: 60 * 1000 * 3, // 3 minutes
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Script to pull the correct SAM docker image based on the NODE_VERSION environment variable.

set -e

if [[ -z "$NODE_VERSION" ]]; then
echo "Error: NODE_VERSION not set"
exit 1
fi

echo "Pulling SAM Node $NODE_VERSION docker image..."
docker pull "public.ecr.aws/sam/build-nodejs${NODE_VERSION}.x:latest"

echo "Successfully pulled SAM Node $NODE_VERSION docker image"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as Sentry from '@sentry/aws-serverless';

export const handler = awslambda.streamifyResponse(async (event, responseStream, context) => {
Sentry.startSpan({ name: 'manual-span', op: 'test' }, async () => {
responseStream.write('Hello, world!');
responseStream.end();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const LAMBDA_FUNCTIONS_WITH_LAYER_DIR = './src/lambda-functions-layer';
const LAMBDA_FUNCTIONS_WITH_NPM_DIR = './src/lambda-functions-npm';
const LAMBDA_FUNCTION_TIMEOUT = 10;
const LAYER_DIR = './node_modules/@sentry/aws-serverless/';
const DEFAULT_NODE_VERSION = '22';
export const SAM_PORT = 3001;
const NODE_RUNTIME = `nodejs${process.version.split('.').at(0)?.replace('v', '')}.x`;

export class LocalLambdaStack extends Stack {
sentryLayer: CfnResource;
Expand Down Expand Up @@ -73,22 +73,20 @@ export class LocalLambdaStack extends Stack {
execFileSync('npm', ['install', '--prefix', path.join(functionsDir, lambdaDir)], { stdio: 'inherit' });
}

const isEsm = fs.existsSync(path.join(functionsDir, lambdaDir, 'index.mjs'));

new CfnResource(this, functionName, {
type: 'AWS::Serverless::Function',
properties: {
CodeUri: path.join(functionsDir, lambdaDir),
Handler: 'index.handler',
Runtime: NODE_RUNTIME,
Runtime: `nodejs${process.env.NODE_VERSION ?? DEFAULT_NODE_VERSION}.x`,
Timeout: LAMBDA_FUNCTION_TIMEOUT,
Layers: addLayer ? [{ Ref: this.sentryLayer.logicalId }] : undefined,
Environment: {
Variables: {
SENTRY_DSN: dsn,
SENTRY_TRACES_SAMPLE_RATE: 1.0,
SENTRY_DEBUG: true,
NODE_OPTIONS: `--${isEsm ? 'import' : 'require'}=@sentry/aws-serverless/awslambda-auto`,
NODE_OPTIONS: `--import=@sentry/aws-serverless/awslambda-auto`,

This comment was marked as outdated.

},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,27 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
const debugLog = tmp.fileSync({ prefix: 'sentry_aws_lambda_tests_sam_debug', postfix: '.log' });
console.log(`[test_environment fixture] Writing SAM debug log to: ${debugLog.name}`);

const process = spawn(
'sam',
[
'local',
'start-lambda',
'--debug',
'--template',
SAM_TEMPLATE_FILE,
'--warm-containers',
'EAGER',
'--docker-network',
DOCKER_NETWORK_NAME,
],
{
stdio: ['ignore', debugLog.fd, debugLog.fd],
},
);
const args = [
'local',
'start-lambda',
'--debug',
'--template',
SAM_TEMPLATE_FILE,
'--warm-containers',
'EAGER',
'--docker-network',
DOCKER_NETWORK_NAME,
];

if (process.env.NODE_VERSION) {
args.push('--invoke-image', `public.ecr.aws/sam/build-nodejs${process.env.NODE_VERSION}.x:latest`);
}

console.log(`[testEnvironment fixture] Running SAM with args: ${args.join(' ')}`);

const samProcess = spawn('sam', args, {
stdio: ['ignore', debugLog.fd, debugLog.fd],
});

try {
await LocalLambdaStack.waitForStack();
Expand All @@ -54,12 +58,12 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
} finally {
console.log('[testEnvironment fixture] Tearing down AWS Lambda test infrastructure');

process.kill('SIGTERM');
samProcess.kill('SIGTERM');
await new Promise(resolve => {
process.once('exit', resolve);
samProcess.once('exit', resolve);
setTimeout(() => {
if (!process.killed) {
process.kill('SIGKILL');
if (!samProcess.killed) {
samProcess.kill('SIGKILL');
}
resolve(void 0);
}, 5000);
Expand Down
Loading
Loading