Skip to content

Commit 0bc8417

Browse files
authored
Merge pull request #17471 from getsentry/prepare-release/10.7.0
meta(changelog): Update changelog for 10.7.0
2 parents 45b8f7e + 0496bbe commit 0bc8417

File tree

50 files changed

+1617
-347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1617
-347
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ jobs:
954954
- name: Build E2E app
955955
working-directory: ${{ runner.temp }}/test-application
956956
timeout-minutes: 7
957-
run: pnpm ${{ matrix.build-command || 'test:build' }}
957+
run: ${{ matrix.build-command || 'pnpm test:build' }}
958958

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

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

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

10911091
- name: Pre-process E2E Test Dumps
10921092
if: failure()

.size-limit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = [
8282
path: 'packages/browser/build/npm/esm/index.js',
8383
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
8484
gzip: true,
85-
limit: '95 KB',
85+
limit: '96 KB',
8686
},
8787
{
8888
name: '@sentry/browser (incl. Feedback)',
@@ -233,7 +233,7 @@ module.exports = [
233233
import: createImport('init'),
234234
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
235235
gzip: true,
236-
limit: '149 KB',
236+
limit: '150 KB',
237237
},
238238
{
239239
name: '@sentry/node - without tracing',

CHANGELOG.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@
44

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

7+
## 10.7.0
8+
9+
### Important Changes
10+
11+
- **feat(cloudflare): Add `instrumentPrototypeMethods` option to instrument RPC methods for DurableObjects ([#17424](https://github.com/getsentry/sentry-javascript/pull/17424))**
12+
13+
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:
14+
15+
```js
16+
class MyDurableObjectBase extends DurableObject<Env> {
17+
method1() {
18+
// ...
19+
}
20+
21+
method2() {
22+
// ...
23+
}
24+
25+
method3() {
26+
// ...
27+
}
28+
}
29+
// Export your named class as defined in your wrangler config
30+
export const MyDurableObject = Sentry.instrumentDurableObjectWithSentry(
31+
(env: Env) => ({
32+
dsn: "https://ac49b7af3017c458bd12dab9b3328bfc@o4508482761982032.ingest.de.sentry.io/4508482780987481",
33+
tracesSampleRate: 1.0,
34+
instrumentPrototypeMethods: ['method1', 'method3'],
35+
}),
36+
MyDurableObjectBase,
37+
);
38+
```
39+
40+
## Other Changes
41+
42+
- feat(aws): Add support for streaming handlers ([#17463](https://github.com/getsentry/sentry-javascript/pull/17463))
43+
- feat(core): Stream responses Anthropic AI ([#17460](https://github.com/getsentry/sentry-javascript/pull/17460))
44+
- feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.56.0 to 0.57.0 ([#17455](https://github.com/getsentry/sentry-javascript/pull/17455))
45+
- feat(deps): bump @opentelemetry/instrumentation-dataloader from 0.21.0 to 0.21.1 ([#17457](https://github.com/getsentry/sentry-javascript/pull/17457))
46+
- feat(deps): bump @opentelemetry/instrumentation-kafkajs from 0.12.0 to 0.13.0 ([#17469](https://github.com/getsentry/sentry-javascript/pull/17469))
47+
- feat(deps): bump @opentelemetry/instrumentation-mysql2 from 0.49.0 to 0.50.0 ([#17459](https://github.com/getsentry/sentry-javascript/pull/17459))
48+
- feat(deps): bump @prisma/instrumentation from 6.13.0 to 6.14.0 ([#17466](https://github.com/getsentry/sentry-javascript/pull/17466))
49+
- feat(deps): bump @sentry/cli from 2.51.1 to 2.52.0 ([#17458](https://github.com/getsentry/sentry-javascript/pull/17458))
50+
- feat(deps): bump @sentry/rollup-plugin from 4.1.0 to 4.1.1 ([#17456](https://github.com/getsentry/sentry-javascript/pull/17456))
51+
- feat(deps): bump @sentry/webpack-plugin from 4.1.0 to 4.1.1 ([#17467](https://github.com/getsentry/sentry-javascript/pull/17467))
52+
- feat(replay): Add option to skip `requestAnimationFrame` for canvas snapshots ([#17380](https://github.com/getsentry/sentry-javascript/pull/17380))
53+
54+
<details>
55+
<summary> <strong>Internal Changes</strong> </summary>
56+
57+
- test(aws): Run E2E tests in all supported Node versions ([#17446](https://github.com/getsentry/sentry-javascript/pull/17446))
58+
59+
</details>
60+
761
## 10.6.0
862

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

4296
</details>
4397

44-
Work in this release was contributed by @Karibash. Thank you for your contribution!
45-
4698
## 10.5.0
4799

48100
- feat(core): better cause data extraction ([#17375](https://github.com/getsentry/sentry-javascript/pull/17375))
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import * as Sentry from '@sentry/cloudflare';
2+
import { DurableObject } from 'cloudflare:workers';
3+
4+
interface Env {
5+
SENTRY_DSN: string;
6+
TEST_DURABLE_OBJECT: DurableObjectNamespace;
7+
}
8+
9+
class TestDurableObjectBase extends DurableObject<Env> {
10+
public constructor(ctx: DurableObjectState, env: Env) {
11+
super(ctx, env);
12+
}
13+
14+
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
15+
async sayHello(name: string): Promise<string> {
16+
return `Hello, ${name}`;
17+
}
18+
}
19+
20+
export const TestDurableObject = Sentry.instrumentDurableObjectWithSentry(
21+
(env: Env) => ({
22+
dsn: env.SENTRY_DSN,
23+
tracesSampleRate: 1.0,
24+
instrumentPrototypeMethods: true,
25+
}),
26+
TestDurableObjectBase,
27+
);
28+
29+
export default {
30+
async fetch(request: Request, env: Env): Promise<Response> {
31+
const id: DurableObjectId = env.TEST_DURABLE_OBJECT.idFromName('test');
32+
const stub = env.TEST_DURABLE_OBJECT.get(id) as unknown as TestDurableObjectBase;
33+
34+
if (request.url.includes('hello')) {
35+
const greeting = await stub.sayHello('world');
36+
return new Response(greeting);
37+
}
38+
39+
return new Response('Usual response');
40+
},
41+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { expect, it } from 'vitest';
2+
import { createRunner } from '../../../runner';
3+
4+
it('traces a durable object method', async () => {
5+
const runner = createRunner(__dirname)
6+
.expect(envelope => {
7+
const transactionEvent = envelope[1]?.[0]?.[1];
8+
expect(transactionEvent).toEqual(
9+
expect.objectContaining({
10+
contexts: expect.objectContaining({
11+
trace: expect.objectContaining({
12+
op: 'rpc',
13+
data: expect.objectContaining({
14+
'sentry.op': 'rpc',
15+
'sentry.origin': 'auto.faas.cloudflare_durableobjects',
16+
}),
17+
origin: 'auto.faas.cloudflare_durableobjects',
18+
}),
19+
}),
20+
transaction: 'sayHello',
21+
}),
22+
);
23+
})
24+
.start();
25+
await runner.makeRequest('get', '/hello');
26+
await runner.completed();
27+
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "worker-name",
3+
"main": "index.ts",
4+
"compatibility_date": "2025-06-17",
5+
"migrations": [
6+
{
7+
"new_sqlite_classes": ["TestDurableObject"],
8+
"tag": "v1"
9+
}
10+
],
11+
"durable_objects": {
12+
"bindings": [
13+
{
14+
"class_name": "TestDurableObject",
15+
"name": "TEST_DURABLE_OBJECT"
16+
}
17+
]
18+
},
19+
"compatibility_flags": ["nodejs_als"],
20+
"vars": {
21+
"SENTRY_DSN": "https://[email protected]/4509553159831552"
22+
}
23+
}

dev-packages/e2e-tests/test-applications/aws-serverless/package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,19 @@
2323
},
2424
"volta": {
2525
"extends": "../../package.json"
26+
},
27+
"sentryTest": {
28+
"variants": [
29+
{
30+
"build-command": "NODE_VERSION=20 ./pull-sam-image.sh && pnpm test:build",
31+
"assert-command": "NODE_VERSION=20 pnpm test:assert",
32+
"label": "aws-serverless (Node 20)"
33+
},
34+
{
35+
"build-command": "NODE_VERSION=18 ./pull-sam-image.sh && pnpm test:build",
36+
"assert-command": "NODE_VERSION=18 pnpm test:assert",
37+
"label": "aws-serverless (Node 18)"
38+
}
39+
]
2640
}
2741
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import { getPlaywrightConfig } from '@sentry-internal/test-utils';
22

3-
export default getPlaywrightConfig();
3+
export default getPlaywrightConfig(undefined, {
4+
timeout: 60 * 1000 * 3, // 3 minutes
5+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Script to pull the correct SAM docker image based on the NODE_VERSION environment variable.
4+
5+
set -e
6+
7+
if [[ -z "$NODE_VERSION" ]]; then
8+
echo "Error: NODE_VERSION not set"
9+
exit 1
10+
fi
11+
12+
echo "Pulling SAM Node $NODE_VERSION docker image..."
13+
docker pull "public.ecr.aws/sam/build-nodejs${NODE_VERSION}.x:latest"
14+
15+
echo "Successfully pulled SAM Node $NODE_VERSION docker image"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as Sentry from '@sentry/aws-serverless';
2+
3+
export const handler = awslambda.streamifyResponse(async (event, responseStream, context) => {
4+
Sentry.startSpan({ name: 'manual-span', op: 'test' }, async () => {
5+
responseStream.write('Hello, world!');
6+
responseStream.end();
7+
});
8+
});

0 commit comments

Comments
 (0)