Skip to content

Commit 143f0e4

Browse files
authored
Merge pull request #16729 from getsentry/prepare-release/9.32.0
meta(changelog): Update changelog for 9.32.0
2 parents 522241e + 32076d3 commit 143f0e4

File tree

67 files changed

+2853
-279
lines changed

Some content is hidden

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

67 files changed

+2853
-279
lines changed

.cursor/rules/publishing_release.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Use this rule if you are looking to publish a release for the Sentr
33
globs:
44
alwaysApply: false
55
---
6+
67
# Publishing a Release
78

89
Use these guidelines when publishing a new Sentry JavaScript SDK release.
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
description: Use this rule if you are looking to upgrade a dependency in the Sentry JavaScript SDKs
3+
globs:
4+
alwaysApply: false
5+
---
6+
# Yarn v1 Dependency Upgrades
7+
8+
## Upgrade Process
9+
10+
### Dependency Analysis
11+
12+
```bash
13+
# Check dependency tree
14+
yarn list --depth=0
15+
16+
# Find why package is installed
17+
yarn why [package-name]
18+
```
19+
20+
### Root Workspace vs. Package Dependencies
21+
22+
**CRITICAL**: Understand the difference between dependency types:
23+
24+
- **Root Workspace dependencies**: Shared dev tools, build tools, testing frameworks
25+
- **Package dependencies**: Package-specific runtime and dev dependencies
26+
- Always check if dependency should be in root workspace or package level
27+
28+
### Upgrade Dependencies
29+
30+
**MANDATORY**: Only ever upgrade a single package at a time.
31+
32+
**CRITICAL RULE**: If a dependency is not defined in `package.json` anywhere, the upgrade must be run in the root workspace as the `yarn.lock` file is contained there.
33+
34+
```bash
35+
# Upgrade specific package to latest compatible version
36+
npx yarn-update-dependency@latest [package-name]
37+
```
38+
39+
Avoid upgrading top-level dependencies (defined in `package.json`), especially if they are used for tests. If you are going to upgrade them, ask the user before proceeding.
40+
41+
**REQUIREMENT**: If a `package.json` file is updated, make sure it has a new line at the end.
42+
43+
#### CRITICAL: OpenTelemetry Dependency Constraint
44+
45+
**STOP UPGRADE IMMEDIATELY** if upgrading any dependency with `opentelemetry` in the name and the new version or any of its dependencies uses forbidden OpenTelemetry versions.
46+
47+
**FORBIDDEN VERSION PATTERNS:**
48+
- `2.x.x` versions (e.g., `2.0.0`, `2.1.0`)
49+
- `0.2xx.x` versions (e.g., `0.200.0`, `0.201.0`)
50+
51+
When upgrading OpenTelemetry dependencies:
52+
1. Check the dependency's `package.json` after upgrade
53+
2. Verify the package itself doesn't use forbidden version patterns
54+
3. Verify none of its dependencies use `@opentelemetry/*` packages with forbidden version patterns
55+
4. **Example**: `@opentelemetry/instrumentation-pg@0.52.0` is forbidden because it bumped to core `2.0.0` and instrumentation `0.200.0`
56+
5. If forbidden OpenTelemetry versions are detected, **ABORT the upgrade** and notify the user that this upgrade cannot proceed due to OpenTelemetry v2+ compatibility constraints
57+
58+
#### CRITICAL: E2E Test Dependencies
59+
60+
**DO NOT UPGRADE** the major version of dependencies in test applications where the test name explicitly mentions a dependency version.
61+
62+
**RULE**: For `dev-packages/e2e-tests/test-applications/*`, if the test directory name mentions a specific version (e.g., `nestjs-8`), do not upgrade that dependency beyond the mentioned major version.
63+
64+
**Example**: Do not upgrade the nestjs version of `dev-packages/e2e-tests/test-applications/nestjs-8` to nestjs 9 or above because the test name mentions nestjs 8.
65+
66+
## Safety Protocols
67+
68+
### Pre-Upgrade Checklist
69+
70+
**COMPLETE ALL STEPS** before proceeding with any upgrade:
71+
72+
1. **Backup**: Ensure clean git state or create backup branch
73+
2. **CI Status**: Verify all tests are passing
74+
3. **Lockfile works**: Confirm `yarn.lock` is in a good state (no merge conflicts)
75+
4. **OpenTelemetry Check**: For OpenTelemetry dependencies, verify no forbidden version patterns (`2.x.x` or `0.2xx.x`) will be introduced
76+
77+
### Post-Upgrade Verification
78+
79+
```bash
80+
# rebuild everything
81+
yarn install
82+
83+
# Build the project
84+
yarn build:dev
85+
86+
# Make sure dependencies are deduplicated
87+
yarn dedupe-deps:fix
88+
89+
# Fix any linting issues
90+
yarn fix
91+
92+
# Check circular dependencies
93+
yarn circularDepCheck
94+
```
95+
96+
## Version Management
97+
98+
### Pinning Strategies
99+
100+
- **Exact versions** (`1.2.3`): Use for critical dependencies
101+
- **Caret versions** (`^1.2.3`): Allow minor updates only
102+
- **Latest tag**: Avoid as much as possible other than in certain testing and development scenarios
103+
104+
## Troubleshooting
105+
106+
- **Yarn Version**: Run `yarn --version` - must be yarn v1 (not v2/v3/v4)
107+
- **Lockfile Issues**: Verify yarn.lock exists and is properly maintained. Fix merge conflicts by running `yarn install`
108+
109+
## Best Practices
110+
111+
### Security Audits
112+
113+
```bash
114+
# Check for security vulnerabilities
115+
yarn audit
116+
117+
# Fix automatically fixable vulnerabilities
118+
yarn audit fix
119+
120+
# Install security patches only
121+
yarn upgrade --security-only
122+
```
123+
124+
### Check for Outdated Dependencies
125+
126+
```bash
127+
# Check all outdated dependencies
128+
yarn outdated
129+
130+
# Check specific package
131+
yarn outdated [package-name]
132+
133+
# Check dependencies in specific workspace
134+
yarn workspace [workspace-name] outdated
135+
```
136+
137+
### Using yarn info for Dependency Inspection
138+
139+
Use `yarn info` to inspect package dependencies before and after upgrades:
140+
141+
```bash
142+
# Check current version and dependencies
143+
yarn info <package-name>
144+
145+
# Check specific version dependencies
146+
yarn info <package-name>@<version>
147+
148+
# Check dependencies field specifically
149+
yarn info <package-name>@<version> dependencies
150+
151+
# Check all available versions
152+
yarn info <package-name> versions
153+
```
154+
155+
The `yarn info` command provides detailed dependency information without requiring installation, making it particularly useful for:
156+
- Verifying OpenTelemetry packages don't introduce forbidden version patterns (`2.x.x` or `0.2xx.x`)
157+
- Checking what dependencies a package will bring in before upgrading
158+
- Understanding package version history and compatibility
159+
160+
### Documentation
161+
162+
- Update README or code comments if dependency change affects usage of the SDK or its integrations
163+
- Notify team of significant changes

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ body:
3737
- '@sentry/node - koa'
3838
- '@sentry/node - hapi'
3939
- '@sentry/node - connect'
40+
- '@sentry/node-native'
4041
- '@sentry/angular'
4142
- '@sentry/astro'
4243
- '@sentry/aws-serverless'

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@
44

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

7+
## 9.32.0
8+
9+
### Important Changes
10+
11+
- feat(browser): Add CLS sources to span attributes ([#16710](https://github.com/getsentry/sentry-javascript/pull/16710))
12+
13+
Enhances CLS (Cumulative Layout Shift) spans by adding attributes detailing the elements that caused layout shifts.
14+
15+
- feat(cloudflare): Add `instrumentWorkflowWithSentry` to instrument workflows ([#16672](https://github.com/getsentry/sentry-javascript/pull/16672))
16+
17+
We've added support for Cloudflare Workflows, enabling comprehensive tracing for your workflow runs. This integration uses the workflow's instanceId as the Sentry trace_id and for sampling, linking all steps together. You'll now be able to see full traces, including retries with exponential backoff.
18+
19+
- feat(pino-transport): Add functionality to send logs to sentry ([#16667](https://github.com/getsentry/sentry-javascript/pull/16667))
20+
21+
Adds the ability to send logs to Sentry via a pino transport.
22+
23+
### Other Changes
24+
25+
- feat(nextjs): Expose top level buildTime `errorHandler` option ([#16718](https://github.com/getsentry/sentry-javascript/pull/16718))
26+
- feat(node): update pipeline spans to use agent naming ([#16712](https://github.com/getsentry/sentry-javascript/pull/16712))
27+
- feat(deps): bump @prisma/instrumentation from 6.9.0 to 6.10.1 ([#16698](https://github.com/getsentry/sentry-javascript/pull/16698))
28+
- fix(sveltekit): Export logger from sveltekit worker ([#16716](https://github.com/getsentry/sentry-javascript/pull/16716))
29+
- fix(google-cloud-serverless): Make `CloudEventsContext` compatible with `CloudEvent` ([#16705](https://github.com/getsentry/sentry-javascript/pull/16705))
30+
- fix(nextjs): Stop injecting release value when create release options is set to `false` ([#16695](https://github.com/getsentry/sentry-javascript/pull/16695))
31+
- fix(node): account for Object. syntax with local variables matching ([#16702](https://github.com/getsentry/sentry-javascript/pull/16702))
32+
- fix(nuxt): Add alias for `@opentelemetry/resources` ([#16727](https://github.com/getsentry/sentry-javascript/pull/16727))
33+
34+
Work in this release was contributed by @flaeppe. Thank you for your contribution!
35+
736
## 9.31.0
837

938
### Important Changes

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ below:
112112
Provides the integration for Session Replay.
113113
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all
114114
JavaScript SDKs with interfaces, type definitions and base classes.
115-
- [`@sentry/pino-transport`](https://github.com/getsentry/sentry-javascript/tree/master/packages/pino-transport): Pino
116-
transport for automatically sending log messages to Sentry.
117115

118116
## Bug Bounty Program
119117

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls-standalone-spans/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ sentryTest('captures a "GOOD" CLS vital with its source as a standalone span', a
6868
transaction: expect.stringContaining('index.html'),
6969
'user_agent.original': expect.stringContaining('Chrome'),
7070
'sentry.pageload.span_id': expect.stringMatching(/[a-f0-9]{16}/),
71+
'cls.source.1': expect.stringContaining('body > div#content > p'),
7172
},
7273
description: expect.stringContaining('body > div#content > p'),
7374
exclusive_time: 0,
@@ -136,6 +137,7 @@ sentryTest('captures a "MEH" CLS vital with its source as a standalone span', as
136137
transaction: expect.stringContaining('index.html'),
137138
'user_agent.original': expect.stringContaining('Chrome'),
138139
'sentry.pageload.span_id': expect.stringMatching(/[a-f0-9]{16}/),
140+
'cls.source.1': expect.stringContaining('body > div#content > p'),
139141
},
140142
description: expect.stringContaining('body > div#content > p'),
141143
exclusive_time: 0,
@@ -202,6 +204,7 @@ sentryTest('captures a "POOR" CLS vital with its source as a standalone span.',
202204
transaction: expect.stringContaining('index.html'),
203205
'user_agent.original': expect.stringContaining('Chrome'),
204206
'sentry.pageload.span_id': expect.stringMatching(/[a-f0-9]{16}/),
207+
'cls.source.1': expect.stringContaining('body > div#content > p'),
205208
},
206209
description: expect.stringContaining('body > div#content > p'),
207210
exclusive_time: 0,

dev-packages/e2e-tests/test-applications/create-remix-app-express/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"eslint-plugin-react-hooks": "^4.6.0",
4949
"tsx": "4.7.2",
5050
"typescript": "^5.1.6",
51+
"vite": "^5.4.11",
5152
"vite-tsconfig-paths": "^4.2.1"
5253
},
5354
"volta": {

dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"@types/react-dom": "^18.2.34",
3131
"@types/prop-types": "15.7.7",
3232
"eslint": "^8.38.0",
33-
"typescript": "^5.1.6"
33+
"typescript": "^5.1.6",
34+
"vite": "^5.4.11"
3435
},
3536
"resolutions": {
3637
"@types/react": "18.2.22"

dev-packages/e2e-tests/test-applications/nextjs-15/tests/ai-test.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test('should create AI spans with correct attributes', async ({ page }) => {
2121
// TODO: For now, this is sadly not fully working - the monkey patching of the ai package is not working
2222
// because of this, only spans that are manually opted-in at call time will be captured
2323
// this may be fixed by https://github.com/vercel/ai/pull/6716 in the future
24-
const aiPipelineSpans = spans.filter(span => span.op === 'ai.pipeline.generate_text');
24+
const aiPipelineSpans = spans.filter(span => span.op === 'gen_ai.invoke_agent');
2525
const aiGenerateSpans = spans.filter(span => span.op === 'gen_ai.generate_text');
2626
const toolCallSpans = spans.filter(span => span.op === 'gen_ai.execute_tool');
2727

dev-packages/e2e-tests/test-applications/solid-solidrouter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"solid-devtools": "^0.29.2",
2323
"tailwindcss": "^3.4.1",
2424
"vite": "^5.4.11",
25-
"vite-plugin-solid": "^2.8.2"
25+
"vite-plugin-solid": "^2.11.6"
2626
},
2727
"dependencies": {
2828
"@solidjs/router": "^0.13.5",

dev-packages/e2e-tests/test-applications/solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"solid-devtools": "^0.29.2",
2323
"tailwindcss": "^3.4.1",
2424
"vite": "^5.4.11",
25-
"vite-plugin-solid": "^2.8.2"
25+
"vite-plugin-solid": "^2.11.6"
2626
},
2727
"dependencies": {
2828
"solid-js": "^1.8.18",

dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.4.5",
2929
"vinxi": "^0.4.0",
3030
"vite": "^5.4.10",
31-
"vite-plugin-solid": "^2.10.2",
31+
"vite-plugin-solid": "^2.11.6",
3232
"vitest": "^1.5.0"
3333
},
3434
"overrides": {

dev-packages/e2e-tests/test-applications/solidstart-spa/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.4.5",
2929
"vinxi": "^0.4.0",
3030
"vite": "^5.4.11",
31-
"vite-plugin-solid": "^2.10.2",
31+
"vite-plugin-solid": "^2.11.6",
3232
"vitest": "^1.5.0"
3333
},
3434
"overrides": {

dev-packages/e2e-tests/test-applications/solidstart-top-level-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.4.5",
2929
"vinxi": "^0.4.0",
3030
"vite": "^5.4.11",
31-
"vite-plugin-solid": "^2.10.2",
31+
"vite-plugin-solid": "^2.11.6",
3232
"vitest": "^1.5.0"
3333
},
3434
"overrides": {

dev-packages/e2e-tests/test-applications/solidstart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.4.5",
2929
"vinxi": "^0.4.0",
3030
"vite": "^5.4.11",
31-
"vite-plugin-solid": "^2.10.2",
31+
"vite-plugin-solid": "^2.11.6",
3232
"vitest": "^1.5.0"
3333
},
3434
"overrides": {

dev-packages/e2e-tests/verdaccio-config/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ packages:
104104
unpublish: $all
105105
# proxy: npmjs # Don't proxy for E2E tests!
106106

107+
'@sentry/node-native':
108+
access: $all
109+
publish: $all
110+
unpublish: $all
111+
# proxy: npmjs # Don't proxy for E2E tests!
112+
107113
'@sentry/opentelemetry':
108114
access: $all
109115
publish: $all
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const Sentry = require('@sentry/node');
2+
const { loggingTransport } = require('@sentry-internal/node-integration-tests');
3+
4+
Sentry.init({
5+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
6+
includeLocalVariables: true,
7+
transport: loggingTransport,
8+
});
9+
10+
process.on('uncaughtException', () => {
11+
// do nothing - this will prevent the Error below from closing this process
12+
});
13+
14+
// Testing GraphQL resolver: https://github.com/getsentry/sentry-javascript/issues/16701
15+
const resolvers = {
16+
Query: {
17+
testSentry: args => {
18+
try {
19+
args.foo.map(x => x);
20+
return true;
21+
} catch (error) {
22+
Sentry.captureException(error);
23+
return false;
24+
}
25+
},
26+
},
27+
};
28+
29+
function regularFunction() {
30+
resolvers.Query.testSentry({ foo: undefined });
31+
}
32+
33+
setTimeout(() => {
34+
regularFunction();
35+
}, 1000);

0 commit comments

Comments
 (0)