Skip to content

Commit a93810e

Browse files
authored
Merge branch 'develop' into sig/console-aws-lambda-fix
2 parents 2821b31 + 313cf82 commit a93810e

136 files changed

Lines changed: 4114 additions & 614 deletions

File tree

Some content is hidden

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

.github/actions/install-dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
shell: bash
1616

1717
- name: Check dependency cache
18-
uses: actions/cache@v4
18+
uses: actions/cache@v5
1919
id: cache_dependencies
2020
with:
2121
path: ${{ env.CACHED_DEPENDENCY_PATHS }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ local.log
3939

4040
.rpt2_cache
4141

42+
# verdaccio local registry (e2e tests)
43+
dev-packages/e2e-tests/verdaccio-config/storage/
44+
4245
lint-results.json
4346
trace.zip
4447

.size-limit.js

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,28 @@ module.exports = [
3838
path: 'packages/browser/build/npm/esm/prod/index.js',
3939
import: createImport('init', 'browserTracingIntegration'),
4040
gzip: true,
41-
limit: '43 KB',
41+
limit: '44 KB',
42+
},
43+
{
44+
name: '@sentry/browser (incl. Tracing + Span Streaming)',
45+
path: 'packages/browser/build/npm/esm/prod/index.js',
46+
import: createImport('init', 'browserTracingIntegration', 'spanStreamingIntegration'),
47+
gzip: true,
48+
limit: '48 KB',
4249
},
4350
{
4451
name: '@sentry/browser (incl. Tracing, Profiling)',
4552
path: 'packages/browser/build/npm/esm/prod/index.js',
4653
import: createImport('init', 'browserTracingIntegration', 'browserProfilingIntegration'),
4754
gzip: true,
48-
limit: '48 KB',
55+
limit: '49 KB',
4956
},
5057
{
5158
name: '@sentry/browser (incl. Tracing, Replay)',
5259
path: 'packages/browser/build/npm/esm/prod/index.js',
5360
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
5461
gzip: true,
55-
limit: '82 KB',
62+
limit: '83 KB',
5663
},
5764
{
5865
name: '@sentry/browser (incl. Tracing, Replay) - with treeshaking flags',
@@ -82,14 +89,14 @@ module.exports = [
8289
path: 'packages/browser/build/npm/esm/prod/index.js',
8390
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
8491
gzip: true,
85-
limit: '87 KB',
92+
limit: '88 KB',
8693
},
8794
{
8895
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
8996
path: 'packages/browser/build/npm/esm/prod/index.js',
9097
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
9198
gzip: true,
92-
limit: '99 KB',
99+
limit: '100 KB',
93100
},
94101
{
95102
name: '@sentry/browser (incl. Feedback)',
@@ -163,7 +170,7 @@ module.exports = [
163170
path: 'packages/vue/build/esm/index.js',
164171
import: createImport('init', 'browserTracingIntegration'),
165172
gzip: true,
166-
limit: '45 KB',
173+
limit: '46 KB',
167174
},
168175
// Svelte SDK (ESM)
169176
{
@@ -184,7 +191,7 @@ module.exports = [
184191
name: 'CDN Bundle (incl. Tracing)',
185192
path: createCDNPath('bundle.tracing.min.js'),
186193
gzip: true,
187-
limit: '44 KB',
194+
limit: '45 KB',
188195
},
189196
{
190197
name: 'CDN Bundle (incl. Logs, Metrics)',
@@ -196,7 +203,7 @@ module.exports = [
196203
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
197204
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
198205
gzip: true,
199-
limit: '45 KB',
206+
limit: '46 KB',
200207
},
201208
{
202209
name: 'CDN Bundle (incl. Replay, Logs, Metrics)',
@@ -208,25 +215,25 @@ module.exports = [
208215
name: 'CDN Bundle (incl. Tracing, Replay)',
209216
path: createCDNPath('bundle.tracing.replay.min.js'),
210217
gzip: true,
211-
limit: '81 KB',
218+
limit: '82 KB',
212219
},
213220
{
214221
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics)',
215222
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
216223
gzip: true,
217-
limit: '82 KB',
224+
limit: '83 KB',
218225
},
219226
{
220227
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
221228
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
222229
gzip: true,
223-
limit: '87 KB',
230+
limit: '88 KB',
224231
},
225232
{
226233
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
227234
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
228235
gzip: true,
229-
limit: '88 KB',
236+
limit: '89 KB',
230237
},
231238
// browser CDN bundles (non-gzipped)
232239
{
@@ -241,7 +248,7 @@ module.exports = [
241248
path: createCDNPath('bundle.tracing.min.js'),
242249
gzip: false,
243250
brotli: false,
244-
limit: '130 KB',
251+
limit: '134 KB',
245252
},
246253
{
247254
name: 'CDN Bundle (incl. Logs, Metrics) - uncompressed',
@@ -255,7 +262,7 @@ module.exports = [
255262
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
256263
gzip: false,
257264
brotli: false,
258-
limit: '134 KB',
265+
limit: '138 KB',
259266
},
260267
{
261268
name: 'CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed',
@@ -269,14 +276,14 @@ module.exports = [
269276
path: createCDNPath('bundle.tracing.replay.min.js'),
270277
gzip: false,
271278
brotli: false,
272-
limit: '248 KB',
279+
limit: '251 KB',
273280
},
274281
{
275282
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',
276283
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
277284
gzip: false,
278285
brotli: false,
279-
limit: '251 KB',
286+
limit: '255 KB',
280287
},
281288
{
282289
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
@@ -290,7 +297,7 @@ module.exports = [
290297
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
291298
gzip: false,
292299
brotli: false,
293-
limit: '264 KB',
300+
limit: '268 KB',
294301
},
295302
// Next.js SDK (ESM)
296303
{
@@ -299,7 +306,7 @@ module.exports = [
299306
import: createImport('init'),
300307
ignore: ['next/router', 'next/constants'],
301308
gzip: true,
302-
limit: '48 KB',
309+
limit: '49 KB',
303310
},
304311
// SvelteKit SDK (ESM)
305312
{
@@ -308,7 +315,7 @@ module.exports = [
308315
import: createImport('init'),
309316
ignore: ['$app/stores'],
310317
gzip: true,
311-
limit: '44 KB',
318+
limit: '45 KB',
312319
},
313320
// Node-Core SDK (ESM)
314321
{

.version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"_comment": "Auto-generated by scripts/bump-version.js. Used by the gitflow sync workflow to detect version bumps. Do not edit manually.",
3-
"version": "10.48.0"
3+
"version": "10.49.0"
44
}

CHANGELOG.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,104 @@
22

33
## Unreleased
44

5+
## 10.49.0
6+
7+
### Important Changes
8+
9+
- **feat(browser): Add View Hierarchy integration ([#14981](https://github.com/getsentry/sentry-javascript/pull/14981))**
10+
11+
A new `viewHierarchyIntegration` captures the DOM structure when an error occurs, providing a snapshot of the page state for debugging. Enable it in your Sentry configuration:
12+
13+
```javascript
14+
import * as Sentry from '@sentry/browser';
15+
16+
Sentry.init({
17+
dsn: '__DSN__',
18+
integrations: [Sentry.viewHierarchyIntegration()],
19+
});
20+
```
21+
22+
- **feat(cloudflare): Split alarms into multiple traces and link them ([#19373](https://github.com/getsentry/sentry-javascript/pull/19373))**
23+
24+
Durable Object alarms now create separate traces for each alarm invocation, with proper linking between related alarms for better observability.
25+
26+
- **feat(cloudflare): Enable RPC trace propagation with `enableRpcTracePropagation` ([#19991](https://github.com/getsentry/sentry-javascript/pull/19991), [#20345](https://github.com/getsentry/sentry-javascript/pull/20345))**
27+
28+
A new `enableRpcTracePropagation` option enables automatic trace propagation for Cloudflare RPC calls via `.fetch()`, ensuring distributed traces flow correctly across service bindings.
29+
30+
- **feat(core): Add `enableTruncation` option to AI integrations ([#20167](https://github.com/getsentry/sentry-javascript/pull/20167), [#20181](https://github.com/getsentry/sentry-javascript/pull/20181), [#20182](https://github.com/getsentry/sentry-javascript/pull/20182), [#20183](https://github.com/getsentry/sentry-javascript/pull/20183), [#20184](https://github.com/getsentry/sentry-javascript/pull/20184))**
31+
32+
All AI integrations (OpenAI, Anthropic, Google GenAI, LangChain, LangGraph) now support an `enableTruncation` option to control whether large AI inputs/outputs are truncated.
33+
34+
- **feat(opentelemetry): Vendor `AsyncLocalStorageContextManager` ([#20243](https://github.com/getsentry/sentry-javascript/pull/20243))**
35+
36+
The OpenTelemetry context manager is now vendored internally, reducing external dependencies and ensuring consistent behavior across environments.
37+
38+
### Other Changes
39+
40+
- feat(core): Export a reusable function to add tracing headers ([#20076](https://github.com/getsentry/sentry-javascript/pull/20076))
41+
- feat(core): Expose `rewriteSources` top level option ([#20142](https://github.com/getsentry/sentry-javascript/pull/20142))
42+
- feat(deps): bump defu from 6.1.4 to 6.1.6 ([#20104](https://github.com/getsentry/sentry-javascript/pull/20104))
43+
- feat(node-native): Add support for V8 v14 (Node v25+) ([#20125](https://github.com/getsentry/sentry-javascript/pull/20125))
44+
- feat(node): Include global scope for `eventLoopBlockIntegration` ([#20108](https://github.com/getsentry/sentry-javascript/pull/20108))
45+
- fix(core, node): Support loading Express options lazily ([#20211](https://github.com/getsentry/sentry-javascript/pull/20211))
46+
- fix(core): Set `conversation_id` only on `gen_ai` spans ([#20274](https://github.com/getsentry/sentry-javascript/pull/20274))
47+
- fix(core): Use `ai.operationId` for Vercel AI V6 operation name mapping ([#20285](https://github.com/getsentry/sentry-javascript/pull/20285))
48+
- fix(deno): Avoid inferring invalid span op from Deno tracer ([#20128](https://github.com/getsentry/sentry-javascript/pull/20128))
49+
- fix(deno): Handle `reader.closed` rejection from `releaseLock()` in streaming ([#20187](https://github.com/getsentry/sentry-javascript/pull/20187))
50+
- fix(nextjs): Preserve directive prologues in turbopack loaders ([#20103](https://github.com/getsentry/sentry-javascript/pull/20103))
51+
- fix(nextjs): Skip custom browser tracing setup for bot user agents ([#20263](https://github.com/getsentry/sentry-javascript/pull/20263))
52+
- fix(opentelemetry): Use WeakRef for context stored on scope to prevent memory leak ([#20328](https://github.com/getsentry/sentry-javascript/pull/20328))
53+
- fix(replay): Use live click attributes in breadcrumbs ([#20262](https://github.com/getsentry/sentry-javascript/pull/20262))
54+
55+
<details>
56+
<summary> <strong>Internal Changes</strong> </summary>
57+
58+
- chore: Add PR review reminder workflow ([#20175](https://github.com/getsentry/sentry-javascript/pull/20175))
59+
- chore: Fix lint warnings ([#20250](https://github.com/getsentry/sentry-javascript/pull/20250))
60+
- chore(bugbot): Add rules to flag test-flake-provoking patterns ([#20192](https://github.com/getsentry/sentry-javascript/pull/20192))
61+
- chore(ci): Bump actions/cache to v5 and actions/download-artifact to v7 ([#20249](https://github.com/getsentry/sentry-javascript/pull/20249))
62+
- chore(ci): Bump dorny/paths-filter from v3.0.1 to v4.0.1 ([#20251](https://github.com/getsentry/sentry-javascript/pull/20251))
63+
- chore(ci): Remove codecov steps from jobs that produce no coverage/JUnit data ([#20244](https://github.com/getsentry/sentry-javascript/pull/20244))
64+
- chore(ci): Remove craft changelog preview ([#20271](https://github.com/getsentry/sentry-javascript/pull/20271))
65+
- chore(ci): Remove node-overhead GitHub Action ([#20246](https://github.com/getsentry/sentry-javascript/pull/20246))
66+
- chore(ci): Replace pr-labels-action with native GitHub expressions ([#20252](https://github.com/getsentry/sentry-javascript/pull/20252))
67+
- chore(ci): Skip flaky issue creation for optional tests ([#20288](https://github.com/getsentry/sentry-javascript/pull/20288))
68+
- chore(deps-dev): Bump @sveltejs/kit from 2.53.3 to 2.57.1 ([#20216](https://github.com/getsentry/sentry-javascript/pull/20216))
69+
- chore(deps-dev): Bump vite from 7.2.0 to 7.3.2 in /dev-packages/e2e-tests/test-applications/tanstackstart-react ([#20107](https://github.com/getsentry/sentry-javascript/pull/20107))
70+
- chore(deps): Bump axios from 1.13.5 to 1.15.0 ([#20180](https://github.com/getsentry/sentry-javascript/pull/20180))
71+
- chore(deps): Bump axios from 1.13.5 to 1.15.0 in /dev-packages/e2e-tests/test-applications/nestjs-basic ([#20179](https://github.com/getsentry/sentry-javascript/pull/20179))
72+
- chore(deps): Bump hono from 4.12.7 to 4.12.12 ([#20118](https://github.com/getsentry/sentry-javascript/pull/20118))
73+
- chore(deps): Bump hono from 4.12.7 to 4.12.12 in /dev-packages/e2e-tests/test-applications/cloudflare-hono ([#20119](https://github.com/getsentry/sentry-javascript/pull/20119))
74+
- chore(deps): Bump next from 16.1.7 to 16.2.3 in nextjs-16-cf-workers ([#20289](https://github.com/getsentry/sentry-javascript/pull/20289))
75+
- chore(size-limit): Bump failing size limit scenario ([#20186](https://github.com/getsentry/sentry-javascript/pull/20186))
76+
- ci: Add automatic flaky test detector ([#18684](https://github.com/getsentry/sentry-javascript/pull/18684))
77+
- ci: Extract test names for flaky test issues ([#20298](https://github.com/getsentry/sentry-javascript/pull/20298))
78+
- ci: Remove Docker container for Verdaccio package publishing ([#20329](https://github.com/getsentry/sentry-javascript/pull/20329))
79+
- fix(ci): Prevent command injection in ci-metadata workflow ([#19899](https://github.com/getsentry/sentry-javascript/pull/19899))
80+
- fix(e2e-tests): Remove flaky navigation breadcrumb assertions from parameterized-routes tests ([#20202](https://github.com/getsentry/sentry-javascript/pull/20202))
81+
- fix(e2e): Add op check to waitForTransaction in React Router e2e tests ([#20193](https://github.com/getsentry/sentry-javascript/pull/20193))
82+
- fix(node-integration-tests): Fix flaky kafkajs test race condition ([#20189](https://github.com/getsentry/sentry-javascript/pull/20189))
83+
- ref(core): Add registry in Vercel ai integration ([#20098](https://github.com/getsentry/sentry-javascript/pull/20098))
84+
- ref(core): Automatically disable truncation when span streaming is enabled in Anthropic AI integration ([#20228](https://github.com/getsentry/sentry-javascript/pull/20228))
85+
- ref(core): Automatically disable truncation when span streaming is enabled in Google GenAI integration ([#20229](https://github.com/getsentry/sentry-javascript/pull/20229))
86+
- ref(core): Automatically disable truncation when span streaming is enabled in LangChain integration ([#20230](https://github.com/getsentry/sentry-javascript/pull/20230))
87+
- ref(core): Automatically disable truncation when span streaming is enabled in LangGraph integration ([#20231](https://github.com/getsentry/sentry-javascript/pull/20231))
88+
- ref(core): Automatically disable truncation when span streaming is enabled in OpenAI integration ([#20227](https://github.com/getsentry/sentry-javascript/pull/20227))
89+
- ref(core): Automatically disable truncation when span streaming is enabled in Vercel AI integration ([#20232](https://github.com/getsentry/sentry-javascript/pull/20232))
90+
- ref(core): Merge embeddings operations constants ([#20095](https://github.com/getsentry/sentry-javascript/pull/20095))
91+
- ref(core): Remove unused constants from vercel-ai-attributes.ts ([#20096](https://github.com/getsentry/sentry-javascript/pull/20096))
92+
- ref(nextjs): Refactor `findInjectionIndexAfterDirectives` for better readability ([#20310](https://github.com/getsentry/sentry-javascript/pull/20310))
93+
- ref(opentelemetry): Replace `@opentelemetry/resources` with inline `getSentryResource()` ([#20327](https://github.com/getsentry/sentry-javascript/pull/20327))
94+
- test: Fix flaky ANR test by increasing blocking duration ([#20239](https://github.com/getsentry/sentry-javascript/pull/20239))
95+
- test(bun): Add bun integration test folder ([#20286](https://github.com/getsentry/sentry-javascript/pull/20286))
96+
- test(cloudflare): Skip flaky durableobject-spans test ([#20282](https://github.com/getsentry/sentry-javascript/pull/20282))
97+
- test(openai): Use multi-message scenario in no-truncation test ([#20194](https://github.com/getsentry/sentry-javascript/pull/20194))
98+
- test(react): Remove duplicated test mock ([#20200](https://github.com/getsentry/sentry-javascript/pull/20200))
99+
- tests(ai): Fix streaming+truncation integration tests across AI integrations ([#20326](https://github.com/getsentry/sentry-javascript/pull/20326))
100+
101+
</details>
102+
5103
## 10.48.0
6104

7105
### Important Changes

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.48.0",
3+
"version": "10.49.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -60,7 +60,7 @@
6060
"@babel/preset-typescript": "^7.16.7",
6161
"@playwright/test": "~1.56.0",
6262
"@sentry-internal/rrweb": "2.34.0",
63-
"@sentry/browser": "10.48.0",
63+
"@sentry/browser": "10.49.0",
6464
"@supabase/supabase-js": "2.49.3",
6565
"axios": "1.15.0",
6666
"babel-loader": "^10.1.1",

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-streamed/test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ sentryTest('starts a streamed navigation span on page navigation', async ({ getL
6969

7070
expect(navigationSpan).toEqual({
7171
attributes: {
72-
effectiveConnectionType: {
72+
'network.connection.effective_type': {
7373
type: 'string',
7474
value: expect.any(String),
7575
},
76-
hardwareConcurrency: {
77-
type: 'string',
78-
value: expect.any(String),
76+
'device.processor_count': {
77+
type: expect.stringMatching(/^(integer)|(double)$/),
78+
value: expect.any(Number),
79+
},
80+
'network.connection.rtt': {
81+
type: expect.stringMatching(/^(integer)|(double)$/),
82+
value: expect.any(Number),
7983
},
8084
'sentry.idle_span_finish_reason': {
8185
type: 'string',

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-streamed/test.ts

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,34 @@ sentryTest(
6262

6363
expect(pageloadSpan).toEqual({
6464
attributes: {
65-
effectiveConnectionType: {
65+
// formerly known as 'effectiveConnectionType'
66+
'network.connection.effective_type': {
6667
type: 'string',
6768
value: expect.any(String),
6869
},
69-
hardwareConcurrency: {
70-
type: 'string',
71-
value: expect.any(String),
70+
// formerly known as 'hardwareConcurrency'
71+
'device.processor_count': {
72+
type: expect.stringMatching(/^(integer)|(double)$/),
73+
value: expect.any(Number),
7274
},
73-
'performance.activationStart': {
74-
type: 'integer',
75+
'browser.performance.navigation.activation_start': {
76+
type: expect.stringMatching(/^(integer)|(double)$/),
77+
value: expect.any(Number),
78+
},
79+
'browser.performance.time_origin': {
80+
type: expect.stringMatching(/^(integer)|(double)$/),
81+
value: expect.any(Number),
82+
},
83+
'network.connection.rtt': {
84+
type: expect.stringMatching(/^(integer)|(double)$/),
85+
value: expect.any(Number),
86+
},
87+
'browser.web_vital.ttfb.request_time': {
88+
type: expect.stringMatching(/^(integer)|(double)$/),
7589
value: expect.any(Number),
7690
},
77-
'performance.timeOrigin': {
78-
type: 'double',
91+
'browser.web_vital.ttfb.value': {
92+
type: expect.stringMatching(/^(integer)|(double)$/),
7993
value: expect.any(Number),
8094
},
8195
'sentry.idle_span_finish_reason': {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
window._testBaseTimestamp = performance.timeOrigin / 1000;
5+
6+
Sentry.init({
7+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
8+
integrations: [Sentry.browserTracingIntegration(), Sentry.spanStreamingIntegration()],
9+
traceLifecycle: 'stream',
10+
tracesSampleRate: 1,
11+
});

0 commit comments

Comments
 (0)