Skip to content

Commit 7c9124c

Browse files
committed
Merge branch 'develop' into lazarnikolov/js-2140-tanstack-start-tunnel-adapter
2 parents 1d827f5 + a87183e commit 7c9124c

File tree

147 files changed

+3689
-978
lines changed

Some content is hidden

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

147 files changed

+3689
-978
lines changed

.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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module.exports = [
155155
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
156156
ignore: ['react/jsx-runtime'],
157157
gzip: true,
158-
limit: '46 KB',
158+
limit: '47 KB',
159159
},
160160
// Vue SDK (ESM)
161161
{
@@ -203,7 +203,7 @@ module.exports = [
203203
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
204204
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
205205
gzip: true,
206-
limit: '46 KB',
206+
limit: '47 KB',
207207
},
208208
{
209209
name: 'CDN Bundle (incl. Replay, Logs, Metrics)',
@@ -241,14 +241,14 @@ module.exports = [
241241
path: createCDNPath('bundle.min.js'),
242242
gzip: false,
243243
brotli: false,
244-
limit: '83.5 KB',
244+
limit: '84 KB',
245245
},
246246
{
247247
name: 'CDN Bundle (incl. Tracing) - uncompressed',
248248
path: createCDNPath('bundle.tracing.min.js'),
249249
gzip: false,
250250
brotli: false,
251-
limit: '134 KB',
251+
limit: '135 KB',
252252
},
253253
{
254254
name: 'CDN Bundle (incl. Logs, Metrics) - uncompressed',
@@ -269,14 +269,14 @@ module.exports = [
269269
path: createCDNPath('bundle.replay.logs.metrics.min.js'),
270270
gzip: false,
271271
brotli: false,
272-
limit: '211 KB',
272+
limit: '212 KB',
273273
},
274274
{
275275
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
276276
path: createCDNPath('bundle.tracing.replay.min.js'),
277277
gzip: false,
278278
brotli: false,
279-
limit: '251 KB',
279+
limit: '252 KB',
280280
},
281281
{
282282
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',
@@ -290,7 +290,7 @@ module.exports = [
290290
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
291291
gzip: false,
292292
brotli: false,
293-
limit: '264 KB',
293+
limit: '265 KB',
294294
},
295295
{
296296
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed',
@@ -324,7 +324,7 @@ module.exports = [
324324
import: createImport('init'),
325325
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
326326
gzip: true,
327-
limit: '59 KB',
327+
limit: '60 KB',
328328
},
329329
// Node SDK (ESM)
330330
{

.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",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
7+
integrations: [Sentry.spanStreamingIntegration(), Sentry.browserTracingIntegration()],
8+
tracesSampleRate: 1.0,
9+
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { expect } from '@playwright/test';
2+
import { sentryTest } from '../../../utils/fixtures';
3+
import { getSpanOp, waitForStreamedSpans } from '../../../utils/spanUtils';
4+
import { shouldSkipTracingTest, testingCdnBundle } from '../../../utils/helpers';
5+
6+
sentryTest('cultureContextIntegration captures locale, timezone, and calendar', async ({ getLocalTestUrl, page }) => {
7+
sentryTest.skip(shouldSkipTracingTest() || testingCdnBundle());
8+
const url = await getLocalTestUrl({ testDir: __dirname });
9+
10+
const spansPromise = waitForStreamedSpans(page, spans => spans.some(s => getSpanOp(s) === 'pageload'));
11+
12+
await page.goto(url);
13+
14+
const spans = await spansPromise;
15+
16+
const pageloadSpan = spans.find(s => getSpanOp(s) === 'pageload');
17+
18+
expect(pageloadSpan!.attributes?.['culture.locale']).toEqual({ type: 'string', value: expect.any(String) });
19+
expect(pageloadSpan!.attributes?.['culture.timezone']).toEqual({ type: 'string', value: expect.any(String) });
20+
expect(pageloadSpan!.attributes?.['culture.calendar']).toEqual({ type: 'string', value: expect.any(String) });
21+
});

dev-packages/browser-integration-tests/suites/public-api/startSpan/streamed/test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ sentryTest(
167167
},
168168
{
169169
attributes: {
170+
'culture.calendar': {
171+
type: 'string',
172+
value: expect.any(String),
173+
},
174+
'culture.locale': {
175+
type: 'string',
176+
value: expect.any(String),
177+
},
178+
'culture.timezone': {
179+
type: 'string',
180+
value: expect.any(String),
181+
},
170182
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
171183
type: 'string',
172184
value: 'test',

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ sentryTest('captures streamed interaction span tree. @firefox', async ({ browser
4040

4141
expect(interactionSegmentSpan).toEqual({
4242
attributes: {
43+
'culture.calendar': {
44+
type: 'string',
45+
value: expect.any(String),
46+
},
47+
'culture.locale': {
48+
type: 'string',
49+
value: expect.any(String),
50+
},
51+
'culture.timezone': {
52+
type: 'string',
53+
value: expect.any(String),
54+
},
4355
[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]: {
4456
type: 'string',
4557
value: 'idleTimeout',

0 commit comments

Comments
 (0)