Skip to content

Commit

Permalink
Merge pull request #12831 from getsentry/prepare-release/8.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Jul 9, 2024
2 parents aeac41d + d9c6dd2 commit 0ffd1ff
Show file tree
Hide file tree
Showing 133 changed files with 1,889 additions and 906 deletions.
3 changes: 3 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ targets:
- name: npm
id: '@sentry/nextjs'
includeNames: /^sentry-nextjs-\d.*\.tgz$/
- name: npm
id: '@sentry/nuxt'
includeNames: /^sentry-nuxt-\d.*\.tgz$/
- name: npm
id: '@sentry/remix'
includeNames: /^sentry-remix-\d.*\.tgz$/
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,7 @@ jobs:
# - AND if the profiling node bindings were either successful or skipped
if: |
always() && needs.job_build.result == 'success' &&
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
runs-on: ubuntu-20.04-large-js
timeout-minutes: 15
Expand Down Expand Up @@ -996,7 +995,6 @@ jobs:
'angular-17',
'angular-18',
'aws-lambda-layer-cjs',
'cloudflare-astro',
'node-express',
'create-react-app',
'create-next-app',
Expand All @@ -1017,6 +1015,7 @@ jobs:
'nextjs-app-dir',
'nextjs-14',
'nextjs-15',
'react-17',
'react-19',
'react-create-hash-router',
'react-router-6-use-routes',
Expand Down Expand Up @@ -1113,24 +1112,15 @@ jobs:
timeout-minutes: 5
run: pnpm test:assert

- name: Deploy Astro to Cloudflare
uses: cloudflare/pages-action@v1
if: matrix.test-application == 'cloudflare-astro'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: dist
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# 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
# We need to add the `always()` check here because the previous step has this as well :(
# See: https://github.com/actions/runner/issues/2205
if:
always() && needs.job_e2e_prepare.result == 'success' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
needs: [job_get_metadata, job_build, job_e2e_prepare]
runs-on: ubuntu-20.04
timeout-minutes: 10
Expand All @@ -1148,6 +1138,7 @@ jobs:
matrix:
test-application:
[
'cloudflare-astro',
'react-send-to-sentry',
'node-express-send-to-sentry',
'debug-id-sourcemaps',
Expand Down Expand Up @@ -1214,6 +1205,16 @@ jobs:
timeout-minutes: 5
run: pnpm ${{ matrix.assert-command || 'test:assert' }}

- name: Deploy Astro to Cloudflare
uses: cloudflare/pages-action@v1
if: matrix.test-application == 'cloudflare-astro'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: dist
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

job_profiling_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# 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
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ on:
jobs:
external_contributor:
name: External Contributors
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-20.04
if: |
github.event.pull_request.author_association != 'COLLABORATOR'
github.event.pull_request.merged == true
&& github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
&& github.actor != 'dependabot[bot]'
Expand All @@ -30,6 +34,8 @@ jobs:
uses: ./dev-packages/external-contributor-gh-action
with:
name: ${{ github.event.pull_request.user.login }}
author_association: ${{ github.event.pull_request.author_association }}

- name: Create PR with changes
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
Expand All @@ -38,5 +44,5 @@ jobs:
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
base: 'develop'
delete-branch: true
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
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 }}"

63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,69 @@

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

## 8.16.0

### Important Changes

- **feat(nextjs): Use spans generated by Next.js for App Router (#12729)**

Previously, the `@sentry/nextjs` SDK automatically recorded spans in the form of transactions for each of your top-level
server components (pages, layouts, ...). This approach had a few drawbacks, the main ones being that traces didn't have
a root span, and more importantly, if you had data stream to the client, its duration was not captured because the
server component spans had finished before the data could finish streaming.

With this release, we will capture the duration of App Router requests in their entirety as a single transaction with
server component spans being descendants of that transaction. This means you will get more data that is also more
accurate. Note that this does not apply to the Edge runtime. For the Edge runtime, the SDK will emit transactions as it
has before.

Generally speaking, this change means that you will see less _transactions_ and more _spans_ in Sentry. You will no
longer receive server component transactions like `Page Server Component (/path/to/route)` (unless using the Edge
runtime), and you will instead receive transactions for your App Router SSR requests that look like
`GET /path/to/route`.

If you are on Sentry SaaS, this may have an effect on your quota consumption: Less transactions, more spans.

- **- feat(nestjs): Add nest cron monitoring support (#12781)**

The `@sentry/nestjs` SDK now includes a `@SentryCron` decorator that can be used to augment the native NestJS `@Cron`
decorator to send check-ins to Sentry before and after each cron job run:

```typescript
import { Cron } from '@nestjs/schedule';
import { SentryCron, MonitorConfig } from '@sentry/nestjs';
import type { MonitorConfig } from '@sentry/types';

const monitorConfig: MonitorConfig = {
schedule: {
type: 'crontab',
value: '* * * * *',
},
checkinMargin: 2, // In minutes. Optional.
maxRuntime: 10, // In minutes. Optional.
timezone: 'America/Los_Angeles', // Optional.
};

export class MyCronService {
@Cron('* * * * *')
@SentryCron('my-monitor-slug', monitorConfig)
handleCron() {
// Your cron job logic here
}
}
```

### Other Changes

- feat(node): Allow to pass instrumentation config to `httpIntegration` (#12761)
- feat(nuxt): Add server error hook (#12796)
- feat(nuxt): Inject sentry config with Nuxt `addPluginTemplate` (#12760)
- fix: Apply stack frame metadata before event processors (#12799)
- fix(feedback): Add missing `h` import in `ScreenshotEditor` (#12784)
- fix(node): Ensure `autoSessionTracking` is enabled by default (#12790)
- ref(feedback): Let CropCorner inherit the existing h prop (#12814)
- ref(otel): Ensure we never swallow args for ContextManager (#12798)

## 8.15.0

- feat(core): allow unregistering callback through `on` (#11710)
Expand Down
138 changes: 2 additions & 136 deletions dev-packages/browser-integration-tests/fixtures/loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [Sentry.moduleMetadataIntegration()],
beforeSend(event) {
const moduleMetadataEntries = [];

if (event.type === undefined) {
try {
event.exception.values.forEach(value => {
value.stacktrace.frames.forEach(frame => {
moduleMetadataEntries.push(frame.module_metadata);
});
});
} catch (e) {
// noop
}
}

event.extra = {
...event.extra,
module_metadata_entries: moduleMetadataEntries,
};

return event;
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var _sentryModuleMetadataGlobal =
typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};

_sentryModuleMetadataGlobal._sentryModuleMetadata = _sentryModuleMetadataGlobal._sentryModuleMetadata || {};

_sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack] = Object.assign(
{},
_sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack],
{
foo: 'bar',
},
);

setTimeout(() => {
throw new Error('I am a module metadata Error');
}, 0);
Loading

0 comments on commit 0ffd1ff

Please sign in to comment.