Skip to content

Commit 0ffd1ff

Browse files
author
Luca Forstner
authored
Merge pull request #12831 from getsentry/prepare-release/8.16.0
2 parents aeac41d + d9c6dd2 commit 0ffd1ff

File tree

133 files changed

+1889
-906
lines changed

Some content is hidden

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

133 files changed

+1889
-906
lines changed

.craft.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ targets:
105105
- name: npm
106106
id: '@sentry/nextjs'
107107
includeNames: /^sentry-nextjs-\d.*\.tgz$/
108+
- name: npm
109+
id: '@sentry/nuxt'
110+
includeNames: /^sentry-nuxt-\d.*\.tgz$/
108111
- name: npm
109112
id: '@sentry/remix'
110113
includeNames: /^sentry-remix-\d.*\.tgz$/

.github/workflows/build.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,7 @@ jobs:
913913
# - AND if the profiling node bindings were either successful or skipped
914914
if: |
915915
always() && needs.job_build.result == 'success' &&
916-
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') &&
917-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
916+
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
918917
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
919918
runs-on: ubuntu-20.04-large-js
920919
timeout-minutes: 15
@@ -996,7 +995,6 @@ jobs:
996995
'angular-17',
997996
'angular-18',
998997
'aws-lambda-layer-cjs',
999-
'cloudflare-astro',
1000998
'node-express',
1001999
'create-react-app',
10021000
'create-next-app',
@@ -1017,6 +1015,7 @@ jobs:
10171015
'nextjs-app-dir',
10181016
'nextjs-14',
10191017
'nextjs-15',
1018+
'react-17',
10201019
'react-19',
10211020
'react-create-hash-router',
10221021
'react-router-6-use-routes',
@@ -1113,24 +1112,15 @@ jobs:
11131112
timeout-minutes: 5
11141113
run: pnpm test:assert
11151114

1116-
- name: Deploy Astro to Cloudflare
1117-
uses: cloudflare/pages-action@v1
1118-
if: matrix.test-application == 'cloudflare-astro'
1119-
with:
1120-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1121-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
1122-
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
1123-
directory: dist
1124-
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1125-
11261115
job_optional_e2e_tests:
11271116
name: E2E ${{ matrix.label || matrix.test-application }} Test
11281117
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
11291118
# We need to add the `always()` check here because the previous step has this as well :(
11301119
# See: https://github.com/actions/runner/issues/2205
11311120
if:
11321121
always() && needs.job_e2e_prepare.result == 'success' &&
1133-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
1122+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1123+
github.actor != 'dependabot[bot]'
11341124
needs: [job_get_metadata, job_build, job_e2e_prepare]
11351125
runs-on: ubuntu-20.04
11361126
timeout-minutes: 10
@@ -1148,6 +1138,7 @@ jobs:
11481138
matrix:
11491139
test-application:
11501140
[
1141+
'cloudflare-astro',
11511142
'react-send-to-sentry',
11521143
'node-express-send-to-sentry',
11531144
'debug-id-sourcemaps',
@@ -1214,6 +1205,16 @@ jobs:
12141205
timeout-minutes: 5
12151206
run: pnpm ${{ matrix.assert-command || 'test:assert' }}
12161207

1208+
- name: Deploy Astro to Cloudflare
1209+
uses: cloudflare/pages-action@v1
1210+
if: matrix.test-application == 'cloudflare-astro'
1211+
with:
1212+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1213+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
1214+
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
1215+
directory: dist
1216+
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1217+
12171218
job_profiling_e2e_tests:
12181219
name: E2E ${{ matrix.label || matrix.test-application }} Test
12191220
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks

.github/workflows/external-contributors.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ on:
99
jobs:
1010
external_contributor:
1111
name: External Contributors
12+
permissions:
13+
pull-requests: write
14+
contents: write
1215
runs-on: ubuntu-20.04
1316
if: |
14-
github.event.pull_request.author_association != 'COLLABORATOR'
17+
github.event.pull_request.merged == true
18+
&& github.event.pull_request.author_association != 'COLLABORATOR'
1519
&& github.event.pull_request.author_association != 'MEMBER'
1620
&& github.event.pull_request.author_association != 'OWNER'
1721
&& github.actor != 'dependabot[bot]'
@@ -30,6 +34,8 @@ jobs:
3034
uses: ./dev-packages/external-contributor-gh-action
3135
with:
3236
name: ${{ github.event.pull_request.user.login }}
37+
author_association: ${{ github.event.pull_request.author_association }}
38+
3339
- name: Create PR with changes
3440
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
3541
with:
@@ -38,5 +44,5 @@ jobs:
3844
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
3945
base: 'develop'
4046
delete-branch: true
41-
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
47+
body: "This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #${{ github.event.pull_request.number }}"
4248

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,69 @@
88

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

11+
## 8.16.0
12+
13+
### Important Changes
14+
15+
- **feat(nextjs): Use spans generated by Next.js for App Router (#12729)**
16+
17+
Previously, the `@sentry/nextjs` SDK automatically recorded spans in the form of transactions for each of your top-level
18+
server components (pages, layouts, ...). This approach had a few drawbacks, the main ones being that traces didn't have
19+
a root span, and more importantly, if you had data stream to the client, its duration was not captured because the
20+
server component spans had finished before the data could finish streaming.
21+
22+
With this release, we will capture the duration of App Router requests in their entirety as a single transaction with
23+
server component spans being descendants of that transaction. This means you will get more data that is also more
24+
accurate. Note that this does not apply to the Edge runtime. For the Edge runtime, the SDK will emit transactions as it
25+
has before.
26+
27+
Generally speaking, this change means that you will see less _transactions_ and more _spans_ in Sentry. You will no
28+
longer receive server component transactions like `Page Server Component (/path/to/route)` (unless using the Edge
29+
runtime), and you will instead receive transactions for your App Router SSR requests that look like
30+
`GET /path/to/route`.
31+
32+
If you are on Sentry SaaS, this may have an effect on your quota consumption: Less transactions, more spans.
33+
34+
- **- feat(nestjs): Add nest cron monitoring support (#12781)**
35+
36+
The `@sentry/nestjs` SDK now includes a `@SentryCron` decorator that can be used to augment the native NestJS `@Cron`
37+
decorator to send check-ins to Sentry before and after each cron job run:
38+
39+
```typescript
40+
import { Cron } from '@nestjs/schedule';
41+
import { SentryCron, MonitorConfig } from '@sentry/nestjs';
42+
import type { MonitorConfig } from '@sentry/types';
43+
44+
const monitorConfig: MonitorConfig = {
45+
schedule: {
46+
type: 'crontab',
47+
value: '* * * * *',
48+
},
49+
checkinMargin: 2, // In minutes. Optional.
50+
maxRuntime: 10, // In minutes. Optional.
51+
timezone: 'America/Los_Angeles', // Optional.
52+
};
53+
54+
export class MyCronService {
55+
@Cron('* * * * *')
56+
@SentryCron('my-monitor-slug', monitorConfig)
57+
handleCron() {
58+
// Your cron job logic here
59+
}
60+
}
61+
```
62+
63+
### Other Changes
64+
65+
- feat(node): Allow to pass instrumentation config to `httpIntegration` (#12761)
66+
- feat(nuxt): Add server error hook (#12796)
67+
- feat(nuxt): Inject sentry config with Nuxt `addPluginTemplate` (#12760)
68+
- fix: Apply stack frame metadata before event processors (#12799)
69+
- fix(feedback): Add missing `h` import in `ScreenshotEditor` (#12784)
70+
- fix(node): Ensure `autoSessionTracking` is enabled by default (#12790)
71+
- ref(feedback): Let CropCorner inherit the existing h prop (#12814)
72+
- ref(otel): Ensure we never swallow args for ContextManager (#12798)
73+
1174
## 8.15.0
1275

1376
- feat(core): allow unregistering callback through `on` (#11710)

dev-packages/browser-integration-tests/fixtures/loader.js

Lines changed: 2 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
Sentry.init({
4+
dsn: 'https://[email protected]/1337',
5+
integrations: [Sentry.moduleMetadataIntegration()],
6+
beforeSend(event) {
7+
const moduleMetadataEntries = [];
8+
9+
if (event.type === undefined) {
10+
try {
11+
event.exception.values.forEach(value => {
12+
value.stacktrace.frames.forEach(frame => {
13+
moduleMetadataEntries.push(frame.module_metadata);
14+
});
15+
});
16+
} catch (e) {
17+
// noop
18+
}
19+
}
20+
21+
event.extra = {
22+
...event.extra,
23+
module_metadata_entries: moduleMetadataEntries,
24+
};
25+
26+
return event;
27+
},
28+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var _sentryModuleMetadataGlobal =
2+
typeof window !== 'undefined'
3+
? window
4+
: typeof global !== 'undefined'
5+
? global
6+
: typeof self !== 'undefined'
7+
? self
8+
: {};
9+
10+
_sentryModuleMetadataGlobal._sentryModuleMetadata = _sentryModuleMetadataGlobal._sentryModuleMetadata || {};
11+
12+
_sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack] = Object.assign(
13+
{},
14+
_sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack],
15+
{
16+
foo: 'bar',
17+
},
18+
);
19+
20+
setTimeout(() => {
21+
throw new Error('I am a module metadata Error');
22+
}, 0);

0 commit comments

Comments
 (0)