getsentry/sentry-javascript (@sentry/node)
### [`v8.16.0`](https://togithub.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#8160)
[Compare Source](https://togithub.com/getsentry/sentry-javascript/compare/8.15.0...8.16.0)
##### Important Changes
- **feat(nextjs): Use spans generated by Next.js for App Router ([#12729](https://togithub.com/getsentry/sentry-javascript/issues/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](https://togithub.com/getsentry/sentry-javascript/issues/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](https://togithub.com/getsentry/sentry-javascript/issues/12761))
- feat(nuxt): Add server error hook ([#12796](https://togithub.com/getsentry/sentry-javascript/issues/12796))
- feat(nuxt): Inject sentry config with Nuxt `addPluginTemplate` ([#12760](https://togithub.com/getsentry/sentry-javascript/issues/12760))
- fix: Apply stack frame metadata before event processors ([#12799](https://togithub.com/getsentry/sentry-javascript/issues/12799))
- fix(feedback): Add missing `h` import in `ScreenshotEditor` ([#12784](https://togithub.com/getsentry/sentry-javascript/issues/12784))
- fix(node): Ensure `autoSessionTracking` is enabled by default ([#12790](https://togithub.com/getsentry/sentry-javascript/issues/12790))
- ref(feedback): Let CropCorner inherit the existing h prop ([#12814](https://togithub.com/getsentry/sentry-javascript/issues/12814))
- ref(otel): Ensure we never swallow args for ContextManager ([#12798](https://togithub.com/getsentry/sentry-javascript/issues/12798))
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
8.15.0
->8.16.0
8.15.0
->8.16.0
Release Notes
getsentry/sentry-javascript (@sentry/node)
### [`v8.16.0`](https://togithub.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#8160) [Compare Source](https://togithub.com/getsentry/sentry-javascript/compare/8.15.0...8.16.0) ##### Important Changes - **feat(nextjs): Use spans generated by Next.js for App Router ([#12729](https://togithub.com/getsentry/sentry-javascript/issues/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](https://togithub.com/getsentry/sentry-javascript/issues/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](https://togithub.com/getsentry/sentry-javascript/issues/12761)) - feat(nuxt): Add server error hook ([#12796](https://togithub.com/getsentry/sentry-javascript/issues/12796)) - feat(nuxt): Inject sentry config with Nuxt `addPluginTemplate` ([#12760](https://togithub.com/getsentry/sentry-javascript/issues/12760)) - fix: Apply stack frame metadata before event processors ([#12799](https://togithub.com/getsentry/sentry-javascript/issues/12799)) - fix(feedback): Add missing `h` import in `ScreenshotEditor` ([#12784](https://togithub.com/getsentry/sentry-javascript/issues/12784)) - fix(node): Ensure `autoSessionTracking` is enabled by default ([#12790](https://togithub.com/getsentry/sentry-javascript/issues/12790)) - ref(feedback): Let CropCorner inherit the existing h prop ([#12814](https://togithub.com/getsentry/sentry-javascript/issues/12814)) - ref(otel): Ensure we never swallow args for ContextManager ([#12798](https://togithub.com/getsentry/sentry-javascript/issues/12798))Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.