Skip to content

Commit 11090b8

Browse files
authored
Merge pull request #12591 from getsentry/prepare-release/8.11.0
meta: Update changelog for 8.11.0
2 parents bbbcc17 + 2331958 commit 11090b8

File tree

25 files changed

+889
-450
lines changed

25 files changed

+889
-450
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
runs-on: ubuntu-20.04
236236
if: |
237237
github.event_name == 'pull_request'
238-
&& (github.action == 'opened' || github.action == 'reopened')
238+
&& (github.event.action == 'opened' || github.event.action == 'reopened')
239239
&& github.event.pull_request.author_association != 'COLLABORATOR'
240240
&& github.event.pull_request.author_association != 'MEMBER'
241241
&& github.event.pull_request.author_association != 'OWNER'

CHANGELOG.md

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

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

7+
## 8.11.0
8+
9+
### Important Changes
10+
11+
- **feat(core): Add `parentSpan` option to `startSpan*` APIs (#12567)**
12+
13+
We've made it easier to create a span as a child of a specific span via the startSpan\* APIs. This should allow you to
14+
explicitly manage the parent-child relationship of your spans better.
15+
16+
```js
17+
Sentry.startSpan({ name: 'root' }, parent => {
18+
const span = Sentry.startInactiveSpan({ name: 'xxx', parentSpan: parent });
19+
20+
Sentry.startSpan({ name: 'xxx', parentSpan: parent }, () => {});
21+
22+
Sentry.startSpanManual({ name: 'xxx', parentSpan: parent }, () => {});
23+
});
24+
```
25+
26+
### Other Changes
27+
28+
- feat(node): Detect release from more providers (#12529)
29+
- fix(profiling-node): Use correct getGlobalScope import (#12564)
30+
- fix(profiling-node) sample timestamps need to be in seconds (#12563)
31+
- ref: Align `@sentry/node` exports from framework SDKs. (#12589)
32+
733
## 8.10.0
834

935
### Important Changes

CONTRIBUTING.md

Lines changed: 13 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ To test local versions of SDK packages, for instance in test projects, you have
5858

5959
**Any nontrivial fixes/features should include tests.** You'll find a `test` folder in each package.
6060

61-
Note that _for the `browser` package only_, if you add a new file to the
62-
[integration test suite](https://github.com/getsentry/sentry-javascript/tree/master/packages/browser/test/integration/suites),
63-
you also need to add it to
64-
[the list in `shell.js`](https://github.com/getsentry/sentry-javascript/blob/b74e199254147fd984e7bb1ea24193aee70afa74/packages/browser/test/integration/suites/shell.js#L25)
65-
as well. Adding tests to existing files will work out of the box in all packages.
61+
For browser related changes, you may also add tests in `dev-packages/browser-integration-tests`. Similarly, for node
62+
integration tests can be added in `dev-packages/node-integration-tests`. Finally, we also have E2E test apps in
63+
`dev-packages/e2e-tests`.
6664

6765
## Running Tests
6866

@@ -112,79 +110,25 @@ Similar to building and testing, linting can be done in the project root or in i
112110

113111
Note: you must run `yarn build` before `yarn lint` will work.
114112

115-
## Considerations Before Sending Your First PR
113+
## External Contributors
116114

117-
When contributing to the codebase, please note:
118-
119-
- Make sure to follow the [Commit, Issue & PR guidelines](#commit-issue--pr-guidelines)
120-
- Non-trivial PRs will not be accepted without tests (see above).
121-
- Please do not bump version numbers yourself.
122-
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-js) and
123-
[`raven-node`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-node) are deprecated, and only
124-
bug and security fix PRs will be accepted targeting the
125-
[3.x branch](https://github.com/getsentry/sentry-javascript/tree/3.x). Any new features and improvements should be to
126-
our new SDKs (`browser`, `node`, and framework-specific packages like `react` and `nextjs`) and the packages which
127-
support them (`core`, `utils`, `integrations`, and the like).
128-
129-
## PR reviews
130-
131-
For feedback in PRs, we use the [LOGAF scale](https://blog.danlew.net/2020/04/15/the-logaf-scale/) to specify how
132-
important a comment is:
133-
134-
- `l`: low - nitpick. You may address this comment, but you don't have to.
135-
- `m`: medium - normal comment. Worth addressing and fixing.
136-
- `h`: high - Very important. We must not merge this PR without addressing this issue.
115+
We highly appreciate external contributions to the SDK. If you want to contribute something, you can just open a PR
116+
against `develop`.
137117

138-
You only need one approval from a maintainer to be able to merge. For some PRs, asking specific or multiple people for
139-
review might be adequate.
118+
The SDK team will check out your PR shortly!
140119

141-
Our different types of reviews:
120+
When contributing to the codebase, please note:
142121

143-
1. **LGTM without any comments.** You can merge immediately.
144-
2. **LGTM with low and medium comments.** The reviewer trusts you to resolve these comments yourself, and you don't need
145-
to wait for another approval.
146-
3. **Only comments.** You must address all the comments and need another review until you merge.
147-
4. **Request changes.** Only use if something critical is in the PR that absolutely must be addressed. We usually use
148-
`h` comments for that. When someone requests changes, the same person must approve the changes to allow merging. Use
149-
this sparingly.
122+
- Make sure to follow the [Commit, Issue & PR guidelines](./docs/commit-issue-pr-guidelines.md)
123+
- Non-trivial PRs will not be accepted without tests (see above).
150124

151125
## Commit, Issue & PR guidelines
152126

153-
### Commits
154-
155-
For commit messages, we use the format:
156-
157-
```
158-
<type>(<scope>): <subject> (<github-id>)
159-
```
160-
161-
For example: `feat(core): Set custom transaction source for event processors (#5722)`.
162-
163-
See [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format) for details.
164-
165-
The Github-ID can be left out until the PR is merged.
166-
167-
### Issues
168-
169-
Issues should at least be categorized by package, for example `package: Node`. Additional labels for categorization can
170-
be added, and the Sentry SDK team may also add further labels as needed.
171-
172-
### Pull Requests (PRs)
173-
174-
PRs are merged via `Squash and merge`. This means that all commits on the branch will be squashed into a single commit,
175-
and committed as such onto master.
176-
177-
- The PR name can generally follow the commit name (e.g.
178-
`feat(core): Set custom transaction source for event processors`)
179-
- Make sure to rebase the branch on `master` before squashing it
180-
- Make sure to update the commit message of the squashed branch to follow the commit guidelines - including the PR
181-
number
182-
183-
### Gitflow
127+
See [Commit, Issue & PR guidelines](./docs/commit-issue-pr-guidelines.md).
184128

185-
We use [Gitflow](https://docs.github.com/en/get-started/quickstart/github-flow) as a branching model.
129+
## PR Reviews
186130

187-
For more details, [see our Gitflow docs](./docs/gitflow.md).
131+
See [PR Reviews](./docs/pr-reviews.md).
188132

189133
## Publishing a Release
190134

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ convenient interface and improved consistency between various JavaScript environ
2828

2929
## Contents
3030

31-
- [Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
31+
- [Contributing](https://github.com/getsentry/sentry-javascript/blob/develop/CONTRIBUTING.md)
3232
- [Supported Platforms](#supported-platforms)
3333
- [Installation and Usage](#installation-and-usage)
3434
- [Other Packages](#other-packages)
@@ -40,7 +40,6 @@ For each major JavaScript platform, there is a specific high-level SDK that prov
4040
package. Please refer to the README and instructions of those SDKs for more detailed information:
4141

4242
- [`@sentry/browser`](https://github.com/getsentry/sentry-javascript/tree/master/packages/browser): SDK for Browsers
43-
- [`@sentry/bun`](https://github.com/getsentry/sentry-javascript/tree/master/packages/bun): SDK for Bun
4443
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node including
4544
integrations for Express
4645
- [`@sentry/angular`](https://github.com/getsentry/sentry-javascript/tree/master/packages/angular): Browser SDK for
@@ -52,6 +51,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
5251
- [`@sentry/sveltekit`](https://github.com/getsentry/sentry-javascript/tree/master/packages/sveltekit): SDK for
5352
SvelteKit
5453
- [`@sentry/vue`](https://github.com/getsentry/sentry-javascript/tree/master/packages/vue): Browser SDK for Vue
54+
- [`@sentry/solid`](https://github.com/getsentry/sentry-javascript/tree/master/packages/solid): Browser SDK for Solid
5555
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
5656
- [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js
5757
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
@@ -64,6 +64,13 @@ package. Please refer to the README and instructions of those SDKs for more deta
6464
native crashes
6565
- [`@sentry/capacitor`](https://github.com/getsentry/sentry-capacitor): SDK for Capacitor Apps and Ionic with support
6666
for native crashes
67+
- [`@sentry/bun`](https://github.com/getsentry/sentry-javascript/tree/master/packages/bun): SDK for Bun
68+
- [`@sentry/deno`](https://github.com/getsentry/sentry-javascript/tree/master/packages/deno): SDK for Deno
69+
70+
## Version Support Policy
71+
72+
The current version of the SDK is 8.x. Version 7.x of the SDK will continue to receive critical bugfixes until end
73+
of 2024.
6774

6875
## Installation and Usage
6976

@@ -77,14 +84,14 @@ yarn add @sentry/browser
7784
Setup and usage of these SDKs always follows the same principle.
7885

7986
```javascript
80-
import { init, captureMessage } from '@sentry/browser';
87+
import * as Sentry from '@sentry/browser';
8188

82-
init({
89+
Sentry.init({
8390
dsn: '__DSN__',
8491
// ...
8592
});
8693

87-
captureMessage('Hello, world!');
94+
Sentry.captureMessage('Hello, world!');
8895
```
8996

9097
## Other Packages

dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/instrument.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Sentry.init({
77
dsn: process.env.E2E_TEST_DSN,
88
tunnel: 'http://localhost:3031/', // proxy server
99
autoInstrumentRemix: true, // auto instrument Remix
10+
integrations: [Sentry.nativeNodeFetchIntegration()],
1011
});

dev-packages/e2e-tests/test-applications/node-express-esm-preload/tests/server.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ test('Should record a transaction for route with parameters', async ({ request }
122122
});
123123
});
124124

125-
test('Should record spans from http instrumentation', async ({ request }) => {
125+
// This fails https://github.com/getsentry/sentry-javascript/pull/12587#issuecomment-2181019422
126+
// Skipping this for now so we don't block releases
127+
test.skip('Should record spans from http instrumentation', async ({ request }) => {
126128
const transactionEventPromise = waitForTransaction('node-express-esm-preload', transactionEvent => {
127129
return transactionEvent.contexts?.trace?.data?.['http.target'] === '/http-req';
128130
});

dev-packages/e2e-tests/test-applications/node-profiling/build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ console.log('Running build using esbuild version', esbuild.version);
1010

1111
esbuild.buildSync({
1212
platform: 'node',
13-
entryPoints: ['./index.js'],
13+
entryPoints: ['./index.ts'],
1414
outdir: './dist',
1515
target: 'esnext',
1616
format: 'cjs',

dev-packages/e2e-tests/test-applications/node-profiling/index.js renamed to dev-packages/e2e-tests/test-applications/node-profiling/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Sentry = require('@sentry/node');
22
const { nodeProfilingIntegration } = require('@sentry/profiling-node');
33

4-
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
4+
const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
55

66
Sentry.init({
77
dsn: 'https://[email protected]/6625302',

dev-packages/e2e-tests/test-applications/node-profiling/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6+
"typecheck": "tsc --noEmit",
67
"build": "node build.mjs",
7-
"start": "node index.js",
8-
"test": "node index.js && node build.mjs",
8+
"test": "npm run build && node dist/index.js",
99
"clean": "npx rimraf node_modules",
10-
"test:build": "npm run build",
10+
"test:build": "npm run typecheck && npm run build",
1111
"test:assert": "npm run test"
1212
},
1313
"dependencies": {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"types": ["node"],
4+
"esModuleInterop": true,
5+
"lib": ["es2018"],
6+
"strict": true,
7+
"outDir": "dist",
8+
"target": "ESNext",
9+
"moduleResolution": "node",
10+
"skipLibCheck": true
11+
},
12+
"include": ["index.ts"]
13+
}

docs/commit-issue-pr-guidelines.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Commit, Issue & PR guidelines
2+
3+
## Commits
4+
5+
For commit messages, we use the format:
6+
7+
```
8+
<type>(<scope>): <subject> (<github-id>)
9+
```
10+
11+
For example: `feat(core): Set custom transaction source for event processors (#5722)`.
12+
13+
See [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format) for details.
14+
15+
The Github-ID can be left out until the PR is merged.
16+
17+
## Issues
18+
19+
Issues should at least be categorized by package, for example `package: Node`. Additional labels for categorization can
20+
be added, and the Sentry SDK team may also add further labels as needed.
21+
22+
## Pull Requests (PRs)
23+
24+
PRs are merged via `Squash and merge`. This means that all commits on the branch will be squashed into a single commit,
25+
and committed as such onto `develop`.
26+
27+
- The PR name can generally follow the commit name (e.g.
28+
`feat(core): Set custom transaction source for event processors`)
29+
- Make sure to rebase the branch on `develop` before squashing it
30+
- Make sure to update the commit message of the squashed branch to follow the commit guidelines - including the PR
31+
number
32+
33+
Please note that we cannot _enforce_ Squash Merge due to the usage of Gitflow (see below). Github remembers the last
34+
used merge method, so you'll need to make sure to double check that you are using "Squash and Merge" correctly.
35+
36+
## Gitflow
37+
38+
We use [Gitflow](https://docs.github.com/en/get-started/quickstart/github-flow) as a branching model.
39+
40+
For more details, [see our Gitflow docs](./gitflow.md).

docs/pr-reviews.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PR reviews
2+
3+
Make sure to open PRs against `develop` branch.
4+
5+
For feedback in PRs, we use the [LOGAF scale](https://blog.danlew.net/2020/04/15/the-logaf-scale/) to specify how
6+
important a comment is:
7+
8+
- `l`: low - nitpick. You may address this comment, but you don't have to.
9+
- `m`: medium - normal comment. Worth addressing and fixing.
10+
- `h`: high - Very important. We must not merge this PR without addressing this issue.
11+
12+
You only need one approval from a maintainer to be able to merge. For some PRs, asking specific or multiple people for
13+
review might be adequate. You can either assign SDK team members directly (e.g. if you have some people in mind who are
14+
well suited to review a PR), or you can assign `getsentry/team-web-sdk-frontend`, which will randomly pick 2 people from
15+
the team to assign.
16+
17+
Our different types of reviews:
18+
19+
1. **LGTM without any comments.** You can merge immediately.
20+
2. **LGTM with low and medium comments.** The reviewer trusts you to resolve these comments yourself, and you don't need
21+
to wait for another approval.
22+
3. **Only comments.** You must address all the comments and need another review until you merge.
23+
4. **Request changes.** Only use if something critical is in the PR that absolutely must be addressed. We usually use
24+
`h` comments for that. When someone requests changes, the same person must approve the changes to allow merging. Use
25+
this sparingly.
26+
27+
You show generally avoid to use "Auto merge". The reason is that we have some CI workflows which do not block merging
28+
(e.g. flaky test detection, some optional E2E tests). If these fail, and you enabled Auto Merge, the PR will be merged
29+
if though some workflow(s) failed. To avoid this, wait for CI to pass to merge the PR manually, or only enable "Auto
30+
Merge" if you know that no optional workflow may fail. Another reason is that, as stated above in 2., reviewers may
31+
leave comments and directly approve the PR. In this case, as PR author you should review the comments and choose which
32+
to implement and which may be ignored for now. "Auto Merge" leads to the PR feedback not being taken into account.
33+
34+
## Reviewing a PR from an external contributor
35+
36+
1. Make sure to review PRs from external contributors in a timely fashion. These users spent their valuable time to
37+
improve our SDK, so we should not leave them hanging with a review!
38+
2. Make sure to click "Approve and Run" on the CI for the PR, if it does not seem malicious.
39+
3. Provide feedback and guidance if the PR is not ready to be merged.
40+
4. Assign the PR to yourself if you start reviewing it. You are then responsible for guiding the PR either to
41+
completion, or to close it if it does not align with the goals of the SDK team.
42+
5. Make sure to update the PR name to align with our commit name structure (see above)

0 commit comments

Comments
 (0)