Skip to content

Commit 870be3b

Browse files
committed
Merge branch 'master' into feat/spotlight-environment-variable-support
2 parents 6ea8d90 + 68e8bb6 commit 870be3b

File tree

188 files changed

+5908
-680
lines changed

Some content is hidden

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

188 files changed

+5908
-680
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,14 @@ body:
136136
id: additional
137137
attributes:
138138
label: Additional Context
139-
description:
140-
Add any other context here. Please keep the pre-filled text, which helps us manage issue prioritization.
141-
value: |-
142-
<sub>Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.</sub>
139+
description: Add any other context here.
143140
validations:
144141
required: false
145-
- type: markdown
142+
- type: dropdown
146143
attributes:
147-
value: |-
148-
## Thanks 🙏
144+
label: 'Priority'
145+
description: Please keep the pre-filled option, which helps us manage issue prioritization.
146+
default: 0
147+
options:
148+
- <sub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1`
149+
or `me too`, to help us triage it.</sub>

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ body:
2727
id: additional
2828
attributes:
2929
label: Additional Context
30-
description:
31-
Add any other context here. Please keep the pre-filled text, which helps us manage feature prioritization.
32-
value: |-
33-
<sub>Tip: React with 👍 to help prioritize this improvement. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.</sub>
30+
description: Add any other context here.
3431
validations:
3532
required: false
36-
- type: markdown
33+
- type: dropdown
3734
attributes:
38-
value: |-
39-
## Thanks 🙏
40-
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
35+
label: 'Priority'
36+
description: Please keep the pre-filled option, which helps us manage issue prioritization.
37+
default: 0
38+
options:
39+
- <sub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1`
40+
or `me too`, to help us triage it.</sub>

.size-limit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = [
3838
path: 'packages/browser/build/npm/esm/prod/index.js',
3939
import: createImport('init', 'browserTracingIntegration'),
4040
gzip: true,
41-
limit: '41.3 KB',
41+
limit: '41.38 KB',
4242
},
4343
{
4444
name: '@sentry/browser (incl. Tracing, Profiling)',
@@ -127,7 +127,7 @@ module.exports = [
127127
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
128128
ignore: ['react/jsx-runtime'],
129129
gzip: true,
130-
limit: '43.3 KB',
130+
limit: '43.33 KB',
131131
},
132132
// Vue SDK (ESM)
133133
{
@@ -142,7 +142,7 @@ module.exports = [
142142
path: 'packages/vue/build/esm/index.js',
143143
import: createImport('init', 'browserTracingIntegration'),
144144
gzip: true,
145-
limit: '43.1 KB',
145+
limit: '43.2 KB',
146146
},
147147
// Svelte SDK (ESM)
148148
{

CHANGELOG.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,102 @@
44

55
- feat(browser): Add environment variable support for Spotlight configuration ([#18198](https://github.com/getsentry/sentry-javascript/pull/18198))
66
- `SENTRY_SPOTLIGHT`, `PUBLIC_SENTRY_SPOTLIGHT`, `NEXT_PUBLIC_SENTRY_SPOTLIGHT`, `VITE_SENTRY_SPOTLIGHT`, `NUXT_PUBLIC_SENTRY_SPOTLIGHT`, `REACT_APP_SENTRY_SPOTLIGHT`, `VUE_APP_SENTRY_SPOTLIGHT`, and `GATSBY_SENTRY_SPOTLIGHT`
7+
8+
## 10.26.0
9+
10+
### Important Changes
11+
12+
- **feat(core): Instrument LangGraph Agent ([#18114](https://github.com/getsentry/sentry-javascript/pull/18114))**
13+
14+
Adds support for instrumenting LangGraph StateGraph operations in Node. The LangGraph integration can be configured as follows:
15+
16+
```js
17+
Sentry.init({
18+
dsn: '__DSN__',
19+
sendDefaultPii: false, // Even with PII disabled globally
20+
integrations: [
21+
Sentry.langGraphIntegration({
22+
recordInputs: true, // Force recording input messages
23+
recordOutputs: true, // Force recording response text
24+
}),
25+
],
26+
});
27+
```
28+
29+
- **feat(cloudflare/vercel-edge): Add manual instrumentation for LangGraph ([#18112](https://github.com/getsentry/sentry-javascript/pull/18112))**
30+
31+
Instrumentation for LangGraph in Cloudflare Workers and Vercel Edge environments is supported by manually calling `instrumentLangGraph`:
32+
33+
```js
34+
import * as Sentry from '@sentry/cloudflare'; // or '@sentry/vercel-edge'
35+
import { StateGraph, START, END, MessagesAnnotation } from '@langchain/langgraph';
36+
37+
// Create and instrument the graph
38+
const graph = new StateGraph(MessagesAnnotation)
39+
.addNode('agent', agentFn)
40+
.addEdge(START, 'agent')
41+
.addEdge('agent', END);
42+
43+
Sentry.instrumentLangGraph(graph, {
44+
recordInputs: true,
45+
recordOutputs: true,
46+
});
47+
48+
const compiled = graph.compile({ name: 'weather_assistant' });
49+
50+
await compiled.invoke({
51+
messages: [{ role: 'user', content: 'What is the weather in SF?' }],
52+
});
53+
```
54+
55+
- **feat(node): Add OpenAI SDK v6 support ([#18244](https://github.com/getsentry/sentry-javascript/pull/18244))**
56+
57+
### Other Changes
58+
59+
- feat(core): Support OpenAI embeddings API ([#18224](https://github.com/getsentry/sentry-javascript/pull/18224))
60+
- feat(browser-utils): bump web-vitals to 5.1.0 ([#18091](https://github.com/getsentry/sentry-javascript/pull/18091))
61+
- feat(core): Support truncation for LangChain integration request messages ([#18157](https://github.com/getsentry/sentry-javascript/pull/18157))
62+
- feat(metrics): Add default `server.address` attribute on server runtimes ([#18242](https://github.com/getsentry/sentry-javascript/pull/18242))
63+
- feat(nextjs): Add URL to server-side transaction events ([#18230](https://github.com/getsentry/sentry-javascript/pull/18230))
64+
- feat(node-core): Add mechanism to prevent wrapping ai providers multiple times([#17972](https://github.com/getsentry/sentry-javascript/pull/17972))
65+
- feat(replay): Bump limit for minReplayDuration ([#18190](https://github.com/getsentry/sentry-javascript/pull/18190))
66+
- fix(browser): Add `ok` status to successful `idleSpan`s ([#18139](https://github.com/getsentry/sentry-javascript/pull/18139))
67+
- fix(core): Check `fetch` support with data URL ([#18225](https://github.com/getsentry/sentry-javascript/pull/18225))
68+
- fix(core): Decrease number of Sentry stack frames for messages from `captureConsoleIntegration` ([#18096](https://github.com/getsentry/sentry-javascript/pull/18096))
69+
- fix(core): Emit processed metric ([#18222](https://github.com/getsentry/sentry-javascript/pull/18222))
70+
- fix(core): Ensure logs past `MAX_LOG_BUFFER_SIZE` are not swallowed ([#18207](https://github.com/getsentry/sentry-javascript/pull/18207))
71+
- fix(core): Ensure metrics past `MAX_METRIC_BUFFER_SIZE` are not swallowed ([#18212](https://github.com/getsentry/sentry-javascript/pull/18212))
72+
- fix(core): Fix logs and metrics flush timeout starvation with continuous logging ([#18211](https://github.com/getsentry/sentry-javascript/pull/18211))
73+
- fix(core): Flatten gen_ai.request.available_tools in google-genai ([#18194](https://github.com/getsentry/sentry-javascript/pull/18194))
74+
- fix(core): Stringify available tools sent from vercelai ([#18197](https://github.com/getsentry/sentry-javascript/pull/18197))
75+
- fix(core/vue): Detect and skip normalizing Vue `VNode` objects with high `normalizeDepth` ([#18206](https://github.com/getsentry/sentry-javascript/pull/18206))
76+
- fix(nextjs): Avoid wrapping middleware files when in standalone mode ([#18172](https://github.com/getsentry/sentry-javascript/pull/18172))
77+
- fix(nextjs): Drop meta trace tags if rendered page is ISR ([#18192](https://github.com/getsentry/sentry-javascript/pull/18192))
78+
- fix(nextjs): Respect PORT variable for dev error symbolication ([#18227](https://github.com/getsentry/sentry-javascript/pull/18227))
79+
- fix(nextjs): use LRU map instead of map for ISR route cache ([#18234](https://github.com/getsentry/sentry-javascript/pull/18234))
80+
- fix(node): `tracingChannel` export missing in older node versions ([#18191](https://github.com/getsentry/sentry-javascript/pull/18191))
781
- fix(node): Fix Spotlight configuration precedence to match specification ([#18195](https://github.com/getsentry/sentry-javascript/pull/18195))
82+
- fix(react): Prevent navigation span leaks for consecutive navigations ([#18098](https://github.com/getsentry/sentry-javascript/pull/18098))
83+
- ref(react-router): Deprecate ErrorBoundary exports ([#18208](https://github.com/getsentry/sentry-javascript/pull/18208))
84+
85+
<details>
86+
<summary> <strong>Internal Changes</strong> </summary>
87+
88+
- chore: Fix missing changelog quote we use for attribution placement ([#18237](https://github.com/getsentry/sentry-javascript/pull/18237))
89+
- chore: move tip about prioritizing issues ([#18071](https://github.com/getsentry/sentry-javascript/pull/18071))
90+
- chore(e2e): Pin `@embroider/addon-shim` to 1.10.0 for the e2e ember-embroider ([#18173](https://github.com/getsentry/sentry-javascript/pull/18173))
91+
- chore(react-router): Fix casing on deprecation notices ([#18221](https://github.com/getsentry/sentry-javascript/pull/18221))
92+
- chore(test): Use correct `testTimeout` field in bundler-tests vitest config
93+
- chore(e2e): Bump zod in e2e tests ([#18251](https://github.com/getsentry/sentry-javascript/pull/18251))
94+
- test(browser-integration): Fix incorrect tag value assertions ([#18162](https://github.com/getsentry/sentry-javascript/pull/18162))
95+
- test(profiling): Add test utils to validate Profile Chunk envelope ([#18170](https://github.com/getsentry/sentry-javascript/pull/18170))
96+
- ref(e2e-ember): Remove `@embroider/addon-shim` override ([#18180](https://github.com/getsentry/sentry-javascript/pull/18180))
97+
- ref(browser): Move trace lifecycle listeners to class function ([#18231](https://github.com/getsentry/sentry-javascript/pull/18231))
98+
- ref(browserprofiling): Move and rename profiler class to UIProfiler ([#18187](https://github.com/getsentry/sentry-javascript/pull/18187))
99+
- ref(core): Move ai integrations from utils to tracing ([#18185](https://github.com/getsentry/sentry-javascript/pull/18185))
100+
- ref(core): Optimize `Scope.setTag` bundle size and adjust test ([#18182](https://github.com/getsentry/sentry-javascript/pull/18182))
101+
102+
</details>
8103

9104
## 10.25.0
10105

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.25.0",
3+
"version": "10.26.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.25.0",
46+
"@sentry/browser": "10.26.0",
4747
"@supabase/supabase-js": "2.49.3",
4848
"axios": "^1.12.2",
4949
"babel-loader": "^8.2.2",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
release: '1.0.0',
8+
environment: 'test',
9+
integrations: integrations => {
10+
return integrations.filter(integration => integration.name !== 'BrowserSession');
11+
},
12+
beforeSendMetric: metric => {
13+
if (metric.name === 'test.counter') {
14+
return {
15+
...metric,
16+
attributes: {
17+
...metric.attributes,
18+
modified: 'by-beforeSendMetric',
19+
original: undefined,
20+
},
21+
};
22+
}
23+
return metric;
24+
},
25+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Store captured metrics from the afterCaptureMetric event
2+
window.capturedMetrics = [];
3+
4+
const client = Sentry.getClient();
5+
6+
client.on('afterCaptureMetric', metric => {
7+
window.capturedMetrics.push(metric);
8+
});
9+
10+
// Capture metrics - these should be processed by beforeSendMetric
11+
Sentry.metrics.count('test.counter', 1, { attributes: { endpoint: '/api/test', original: 'value' } });
12+
Sentry.metrics.gauge('test.gauge', 42, { unit: 'millisecond', attributes: { server: 'test-1' } });
13+
14+
Sentry.flush();
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { expect } from '@playwright/test';
2+
import { sentryTest } from '../../../../utils/fixtures';
3+
4+
sentryTest(
5+
'should emit afterCaptureMetric event with processed metric from beforeSendMetric',
6+
async ({ getLocalTestUrl, page }) => {
7+
const bundle = process.env.PW_BUNDLE || '';
8+
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
9+
sentryTest.skip();
10+
}
11+
12+
const url = await getLocalTestUrl({ testDir: __dirname });
13+
await page.goto(url);
14+
15+
await page.waitForFunction(() => {
16+
return (window as any).capturedMetrics.length >= 2;
17+
});
18+
19+
const capturedMetrics = await page.evaluate(() => {
20+
return (window as any).capturedMetrics;
21+
});
22+
23+
expect(capturedMetrics).toHaveLength(2);
24+
25+
// Verify the counter metric was modified by beforeSendMetric
26+
expect(capturedMetrics[0]).toMatchObject({
27+
name: 'test.counter',
28+
type: 'counter',
29+
value: 1,
30+
attributes: {
31+
endpoint: '/api/test',
32+
modified: 'by-beforeSendMetric',
33+
'sentry.release': '1.0.0',
34+
'sentry.environment': 'test',
35+
'sentry.sdk.name': 'sentry.javascript.browser',
36+
},
37+
});
38+
39+
// Verify the 'original' attribute was removed by beforeSendMetric
40+
expect(capturedMetrics[0].attributes.original).toBeUndefined();
41+
42+
// Verify the gauge metric was not modified (no beforeSendMetric processing)
43+
expect(capturedMetrics[1]).toMatchObject({
44+
name: 'test.gauge',
45+
type: 'gauge',
46+
unit: 'millisecond',
47+
value: 42,
48+
attributes: {
49+
server: 'test-1',
50+
'sentry.release': '1.0.0',
51+
'sentry.environment': 'test',
52+
'sentry.sdk.name': 'sentry.javascript.browser',
53+
},
54+
});
55+
56+
expect(capturedMetrics[0].attributes['sentry.sdk.version']).toBeDefined();
57+
expect(capturedMetrics[1].attributes['sentry.sdk.version']).toBeDefined();
58+
},
59+
);

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.25.0",
3+
"version": "10.26.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/bundler-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/bundler-tests",
3-
"version": "10.25.0",
3+
"version": "10.26.0",
44
"description": "Bundler tests for Sentry Browser SDK",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bundler-tests",
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"@rollup/plugin-node-resolve": "^15.2.3",
16-
"@sentry/browser": "10.25.0",
16+
"@sentry/browser": "10.26.0",
1717
"rollup": "^4.0.0",
1818
"vite": "^5.0.0",
1919
"vitest": "^3.2.4",

0 commit comments

Comments
 (0)