Skip to content

Commit 7a952bd

Browse files
authored
Merge branch 'develop' into sig/test-legacy-profiling
2 parents d7df494 + 895b385 commit 7a952bd

File tree

166 files changed

+6275
-1222
lines changed

Some content is hidden

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

166 files changed

+6275
-1222
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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))

dev-packages/browser-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "10.6.0",
3+
"version": "10.7.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "~1.53.2",
4545
"@sentry-internal/rrweb": "2.34.0",
46-
"@sentry/browser": "10.6.0",
46+
"@sentry/browser": "10.7.0",
4747
"@supabase/supabase-js": "2.49.3",
4848
"axios": "1.8.2",
4949
"babel-loader": "^8.2.2",

dev-packages/bundle-analyzer-scenarios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/bundle-analyzer-scenarios",
3-
"version": "10.6.0",
3+
"version": "10.7.0",
44
"description": "Scenarios to test bundle analysis with",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",

dev-packages/clear-cache-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/clear-cache-gh-action",
33
"description": "An internal Github Action to clear GitHub caches.",
4-
"version": "10.6.0",
4+
"version": "10.7.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/cloudflare-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/cloudflare-integration-tests",
3-
"version": "10.6.0",
3+
"version": "10.7.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=18"
@@ -13,7 +13,7 @@
1313
"test:watch": "yarn test --watch"
1414
},
1515
"dependencies": {
16-
"@sentry/cloudflare": "10.6.0"
16+
"@sentry/cloudflare": "10.7.0"
1717
},
1818
"devDependencies": {
1919
"@cloudflare/workers-types": "^4.20250708.0",
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/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/e2e-tests",
3-
"version": "10.6.0",
3+
"version": "10.7.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {

0 commit comments

Comments
 (0)