Skip to content

[Gitflow] Merge master into develop #10067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,93 @@

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

## 7.92.0

### Important Changes

#### Deprecations

- feat(core): Add `span.updateName()` and deprecate `span.setName()` (#10018)
- feat(core): Deprecate `span.getTraceContext()` (#10032)
- feat(core): Deprecate `span.toTraceparent()` in favor of `spanToTraceHeader()` util (#10031)
- feat(core): Deprecate `trace` in favor of `startSpan` (#10012)
- feat(core): Deprecate span `toContext()` and `updateWithContext()` (#10030)
- ref: Deprecate `deepReadDirSync` (#10016)
- ref: Deprecate `lastEventId()` (#10043)

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).

#### Cron Monitoring Support for `cron` and `node-cron` libraries

- feat(node): Instrumentation for `cron` library (#9999)
- feat(node): Instrumentation for `node-cron` library (#9904)

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/).

For [`cron`](https://www.npmjs.com/package/cron):

```js
import * as Sentry from '@sentry/node';
import { CronJob } from 'cron';

const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');

// use the constructor
const job = new CronJobWithCheckIn('* * * * *', () => {
console.log('You will see this message every minute');
});

// or from
const job = CronJobWithCheckIn.from({
cronTime: '* * * * *',
onTick: () => {
console.log('You will see this message every minute');
},
});
```

For [`node-cron`](https://www.npmjs.com/package/node-cron):

```js
import * as Sentry from '@sentry/node';
import cron from 'node-cron';

const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);

cronWithCheckIn.schedule(
'* * * * *',
() => {
console.log('running a task every minute');
},
{ name: 'my-cron-job' },
);
```

### Other Changes

- feat(astro): Add `enabled` option to Astro integration options (#10007)
- feat(core): Add `attributes` to `Span` (#10008)
- feat(core): Add `setClient()` and `getClient()` to `Scope` (#10055)
- feat(integrations): Capture error cause with `captureErrorCause` in `ExtraErrorData` integration (#9914)
- feat(node-experimental): Allow to pass base span options to trace methods (#10006)
- feat(node): Local variables via async inspector in node 19+ (#9962)
- fix(astro): handle commonjs related issues (#10042)
- fix(astro): Handle non-utf8 encoded streams in middleware (#9989)
- fix(astro): prevent sentry from externalized (#9994)
- fix(core): Ensure `withScope` sets current scope correctly with async callbacks (#9974)
- fix(node): ANR fixes and additions (#9998)
- fix(node): Anr should not block exit (#10035)
- fix(node): Correctly resolve module name (#10001)
- fix(node): Handle inspector already open (#10025)
- fix(node): Make `NODE_VERSION` properties required (#9964)
- fix(node): Anr doesn't block exit (#10064)
- fix(utils): use correct typeof URL validation (#10028)
- perf(astro): reduce unnecessary path resolutions (#10021)
- ref(astro): Use astro logger instead of console (#9995)
- ref(remix): Isolate Express instrumentation from server auto-instrumentation. (#9966)

Work in this release contributed by @joshkel. Thank you for your contribution!

## 7.91.0

### Important Changes
Expand Down
31 changes: 30 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ npx @sentry/migr8@latest

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

## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()`

`Sentry.lastEventId()` sometimes causes race conditons, so we are deprecating it in favour of the `beforeSend` callback.

```js
// Before

Sentry.init({
beforeSend(event, hint) {
const lastCapturedEventId = Sentry.lastEventId();

// Do something with `lastCapturedEventId` here

return event;
},
});

// After
Sentry.init({
beforeSend(event, hint) {
const lastCapturedEventId = event.event_id;

// Do something with `lastCapturedEventId` here

return event;
},
});
```

## Deprecated fields on `Span` and `Transaction`

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

// Do something with `lastCapturedEventId` here

return event;
},
});
Expand Down
6 changes: 3 additions & 3 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "7.91.0",
"version": "7.92.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -45,9 +45,9 @@
"dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.31.1",
"@sentry/browser": "7.91.0",
"@sentry/tracing": "7.91.0",
"@sentry-internal/rrweb": "2.6.0",
"@sentry/browser": "7.92.0",
"@sentry/tracing": "7.92.0",
"axios": "1.6.0",
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "7.91.0",
"version": "7.92.0",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/node-integration-tests",
"version": "7.91.0",
"version": "7.92.0",
"license": "MIT",
"engines": {
"node": ">=10"
Expand All @@ -18,9 +18,9 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@sentry/node": "7.91.0",
"@sentry/tracing": "7.91.0",
"@prisma/client": "3.15.2",
"@sentry/node": "7.92.0",
"@sentry/tracing": "7.92.0",
"@types/mongodb": "^3.6.20",
"@types/mysql": "^2.15.21",
"@types/pg": "^8.6.5",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/overhead-metrics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "7.91.0",
"version": "7.92.0",
"name": "@sentry-internal/overhead-metrics",
"main": "index.js",
"author": "Sentry",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/rollup-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/rollup-utils",
"version": "7.91.0",
"version": "7.92.0",
"description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "7.91.0",
"version": "7.92.0",
"npmClient": "yarn"
}
8 changes: 4 additions & 4 deletions packages/angular-ivy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular-ivy",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for Angular with full Ivy Support",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0",
"@sentry/browser": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0",
"tslib": "^2.4.1"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for Angular",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0",
"@sentry/browser": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0",
"tslib": "^2.4.1"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/astro",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for Astro",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro",
Expand Down Expand Up @@ -49,11 +49,11 @@
"astro": ">=3.x || >=4.0.0-beta"
},
"dependencies": {
"@sentry/browser": "7.91.0",
"@sentry/core": "7.91.0",
"@sentry/node": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0",
"@sentry/browser": "7.92.0",
"@sentry/core": "7.92.0",
"@sentry/node": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0",
"@sentry/vite-plugin": "^2.8.0"
},
"devDependencies": {
Expand Down
16 changes: 8 additions & 8 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/browser",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for browsers",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
Expand Down Expand Up @@ -29,15 +29,15 @@
"access": "public"
},
"dependencies": {
"@sentry-internal/feedback": "7.91.0",
"@sentry-internal/tracing": "7.91.0",
"@sentry/core": "7.91.0",
"@sentry/replay": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0"
"@sentry-internal/feedback": "7.92.0",
"@sentry-internal/tracing": "7.92.0",
"@sentry/core": "7.92.0",
"@sentry/replay": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0"
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.91.0",
"@sentry-internal/integration-shims": "7.92.0",
"@types/md5": "2.1.33",
"btoa": "^1.2.1",
"chai": "^4.1.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/bun",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for bun",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun",
Expand Down Expand Up @@ -29,10 +29,10 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "7.91.0",
"@sentry/node": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0"
"@sentry/core": "7.92.0",
"@sentry/node": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0"
},
"devDependencies": {
"bun-types": "latest"
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/core",
"version": "7.91.0",
"version": "7.92.0",
"description": "Base implementation for all Sentry JavaScript SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
Expand Down Expand Up @@ -29,8 +29,8 @@
"access": "public"
},
"dependencies": {
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0"
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0"
},
"scripts": {
"build": "run-p build:transpile build:types",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = '7.91.0';
export const SDK_VERSION = '7.92.0';
10 changes: 5 additions & 5 deletions packages/deno/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/deno",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for Deno",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno",
Expand All @@ -17,10 +17,10 @@
"index.d.ts"
],
"dependencies": {
"@sentry/browser": "7.91.0",
"@sentry/core": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0"
"@sentry/browser": "7.92.0",
"@sentry/core": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
Expand Down
8 changes: 4 additions & 4 deletions packages/ember/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/ember",
"version": "7.91.0",
"version": "7.92.0",
"description": "Official Sentry SDK for Ember.js",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember",
Expand Down Expand Up @@ -32,9 +32,9 @@
},
"dependencies": {
"@embroider/macros": "^1.9.0",
"@sentry/browser": "7.91.0",
"@sentry/types": "7.91.0",
"@sentry/utils": "7.91.0",
"@sentry/browser": "7.92.0",
"@sentry/types": "7.92.0",
"@sentry/utils": "7.92.0",
"ember-auto-import": "^1.12.1 || ^2.4.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.1.1",
Expand Down
Loading