Skip to content

Commit 8b9edf3

Browse files
AbhiPrasadc298lee
authored andcommitted
meta(changelog): Update changelog for 7.92.0
1 parent 8c6b72e commit 8b9edf3

File tree

2 files changed

+117
-1
lines changed

2 files changed

+117
-1
lines changed

CHANGELOG.md

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

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

7+
## 7.92.0
8+
9+
### Important Changes
10+
11+
#### Deprecations
12+
13+
- feat(core): Add `span.updateName()` and deprecate `span.setName()` (#10018)
14+
- feat(core): Deprecate `span.getTraceContext()` (#10032)
15+
- feat(core): Deprecate `span.toTraceparent()` in favor of `spanToTraceHeader()` util (#10031)
16+
- feat(core): Deprecate `trace` in favor of `startSpan` (#10012)
17+
- feat(core): Deprecate span `toContext()` and `updateWithContext()` (#10030)
18+
- ref: Deprecate `deepReadDirSync` (#10016)
19+
- ref: Deprecate `lastEventId()` (#10043)
20+
21+
Please take a look at the [Migration docs](./MIGRATION.md) for more details. These methods will be removed in the upcoming [v8 major release](https://github.com/getsentry/sentry-javascript/discussions/9802).
22+
23+
#### Cron Monitoring Support for `cron` and `node-cron` libraries
24+
25+
- feat(node): Instrumentation for `cron` library (#9999)
26+
- feat(node): Instrumentation for `node-cron` library (#9904)
27+
28+
This release adds instrumentation for the `cron` and `node-cron` libraries. This allows you to monitor your cron jobs with [Sentry cron monitors](https://docs.sentry.io/product/crons/).
29+
30+
For [`cron`](https://www.npmjs.com/package/cron):
31+
32+
```js
33+
import * as Sentry from '@sentry/node';
34+
import { CronJob } from 'cron';
35+
36+
const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');
37+
38+
// use the constructor
39+
const job = new CronJobWithCheckIn('* * * * *', () => {
40+
console.log('You will see this message every minute');
41+
});
42+
43+
// or from
44+
const job = CronJobWithCheckIn.from({
45+
cronTime: '* * * * *',
46+
onTick: () => {
47+
console.log('You will see this message every minute');
48+
},
49+
});
50+
```
51+
52+
For [`node-cron`](https://www.npmjs.com/package/node-cron):
53+
54+
```js
55+
import * as Sentry from '@sentry/node';
56+
import cron from 'node-cron';
57+
58+
const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);
59+
60+
cronWithCheckIn.schedule(
61+
'* * * * *',
62+
() => {
63+
console.log('running a task every minute');
64+
},
65+
{ name: 'my-cron-job' },
66+
);
67+
```
68+
69+
### Other Changes
70+
71+
- feat(astro): Add `enabled` option to Astro integration options (#10007)
72+
- feat(core): Add `attributes` to `Span` (#10008)
73+
- feat(core): Add `setClient()` and `getClient()` to `Scope` (#10055)
74+
- feat(integrations): Capture error cause with `captureErrorCause` in `ExtraErrorData` integration (#9914)
75+
- feat(node-experimental): Allow to pass base span options to trace methods (#10006)
76+
- feat(node): Local variables via async inspector in node 19+ (#9962)
77+
- fix(astro): handle commonjs related issues (#10042)
78+
- fix(astro): Handle non-utf8 encoded streams in middleware (#9989)
79+
- fix(astro): prevent sentry from externalized (#9994)
80+
- fix(core): Ensure `withScope` sets current scope correctly with async callbacks (#9974)
81+
- fix(node): ANR fixes and additions (#9998)
82+
- fix(node): Anr should not block exit (#10035)
83+
- fix(node): Correctly resolve module name (#10001)
84+
- fix(node): Handle inspector already open (#10025)
85+
- fix(node): Make `NODE_VERSION` properties required (#9964)
86+
- fix(node): Anr doesn't block exit (#10064)
87+
- fix(utils): use correct typeof URL validation (#10028)
88+
- perf(astro): reduce unnecessary path resolutions (#10021)
89+
- ref(astro): Use astro logger instead of console (#9995)
90+
- ref(remix): Isolate Express instrumentation from server auto-instrumentation. (#9966)
91+
92+
Work in this release contributed by @joshkel. Thank you for your contribution!
93+
794
## 7.91.0
895

996
### Important Changes

MIGRATION.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@ npx @sentry/migr8@latest
88

99
This will let you select which updates to run, and automatically update your code. Make sure to still review all code changes!
1010

11+
## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()`
12+
13+
`Sentry.lastEventId()` sometimes causes race conditons, so we are deprecating it in favour of the `beforeSend` callback.
14+
15+
```js
16+
// Before
17+
18+
Sentry.init({
19+
beforeSend(event, hint) {
20+
const lastCapturedEventId = Sentry.lastEventId();
21+
22+
// Do something with `lastCapturedEventId` here
23+
24+
return event;
25+
},
26+
});
27+
28+
// After
29+
Sentry.init({
30+
beforeSend(event, hint) {
31+
const lastCapturedEventId = event.event_id;
32+
33+
// Do something with `lastCapturedEventId` here
34+
35+
return event;
36+
},
37+
});
38+
```
39+
1140
## Deprecated fields on `Span` and `Transaction`
1241

1342
In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated:
@@ -57,7 +86,7 @@ Sentry.init({
5786
const lastCapturedEventId = event.event_id;
5887

5988
// Do something with `lastCapturedEventId` here
60-
89+
6190
return event;
6291
},
6392
});

0 commit comments

Comments
 (0)