Skip to content

fix(deps): update sentry sdk to ^7.48.0 #545

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 1 commit into from
Apr 18, 2023
Merged

fix(deps): update sentry sdk to ^7.48.0 #545

merged 1 commit into from
Apr 18, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 30, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@sentry/integrations (source) ^7.47.0 -> ^7.48.0 age adoption passing confidence
@sentry/node (source) ^7.47.0 -> ^7.48.0 age adoption passing confidence
@sentry/utils (source) ^7.47.0 -> ^7.48.0 age adoption passing confidence
@sentry/vue (source) ^7.47.0 -> ^7.48.0 age adoption passing confidence

Release Notes

getsentry/sentry-javascript

v7.48.0

Compare Source

Important Changes
  • feat(node): Add AsyncLocalStorage implementation of AsyncContextStrategy (#​7800)
    • feat(core): Extend AsyncContextStrategy to allow reuse of existing context (#​7778)
    • feat(core): Make runWithAsyncContext public API (#​7817)
    • feat(core): Add async context abstraction (#​7753)
    • feat(node): Adds domain implementation of AsyncContextStrategy (#​7767)
    • feat(node): Auto-select best AsyncContextStrategy for Node.js version (#​7804)
    • feat(node): Migrate to domains used through AsyncContextStrategy (#​7779)

This release switches the SDK to use AsyncLocalStorage as the async context isolation mechanism in the SDK for Node 14+. For Node 10 - 13, we continue to use the Node domain standard library, since AsyncLocalStorage is not supported there. Preliminary testing showed a 30% improvement in latency and rps when making the switch from domains to AsyncLocalStorage on Node 16.

If you want to manually add async context isolation to your application, you can use the new runWithAsyncContext API.

import * as Sentry from '@​sentry/node';

const requestHandler = (ctx, next) => {
  return new Promise((resolve, reject) => {
    Sentry.runWithAsyncContext(async () => {
      const hub = Sentry.getCurrentHub();

      hub.configureScope(scope =>
        scope.addEventProcessor(event =>
          Sentry.addRequestDataToEvent(event, ctx.request, {
            include: {
              user: false,
            },
          })
        )
      );

      try {
        await next();
      } catch (err) {
        reject(err);
      }
      resolve();
    });
  });
};

If you're manually using domains to isolate Sentry data, we strongly recommend switching to this API!

In addition to exporting runWithAsyncContext publicly, the SDK also uses it internally where we previously used domains.

  • feat(sveltekit): Remove withSentryViteConfig (#​7789)
    • feat(sveltekit): Remove SDK initialization via dedicated files (#​7791)

This release removes our withSentryViteConfig wrapper we previously instructed you to add to your vite.config.js file. It is replaced Vite plugins which you simply add to your Vite config, just like the sveltekit() Vite plugins. We believe this is a more transparent and Vite/SvelteKit-native way of applying build time modifications. Here's how to use the plugins:

// vite.config.js
import { sveltekit } from '@​sveltejs/kit/vite';
import { sentrySvelteKit } from '@​sentry/sveltekit';

export default {
  plugins: [sentrySvelteKit(), sveltekit()],
  // ... rest of your Vite config
};

Take a look at the README for updated instructions!

Furthermore, with this transition, we removed the possibility to intialize the SDK in dedicated sentry.(client|server).config.js files. Please use SvelteKit's hooks files to initialize the SDK.

Please note that these are breaking changes! We're sorry for the inconvenience but the SvelteKit SDK is still in alpha stage and we want to establish a clean and SvelteKit-friendly API before making the SDK stable. You have been warned ;)

  • feat(sveltekit): Add Sentry Vite Plugin to upload source maps (#​7811)

This release adds automatic upload of source maps to the SvelteKit SDK. No need to configure anything other than adding our Vite plugins to your SDK. The example above shows you how to do this.

Please make sure to follow the README to specify your Sentry auth token, as well as org and project slugs.

- feat(replay): Capture request & response headers (#​7816)

Replay now captures the content-length, content-type, and accept headers from requests and responses automatically.

Additional Features and Fixes
  • feat(browser): Export request instrumentation options (#​7818)
  • feat(core): Add async context abstraction (#​7753)
  • feat(core): Add DSC to all outgoing envelopes (#​7820)
  • feat(core): Cache processed stacks for debug IDs (#​7825)
  • feat(node): Add checkin envelope types (#​7777)
  • feat(replay): Add getReplayId() method (#​7822)
  • fix(browser): Adjust BrowserTransportOptions to support offline transport options (#​7775)
  • fix(browser): DOMException SecurityError stacktrace parsing bug (#​7821)
  • fix(core): Log warning when tracing extensions are missing (#​7601)
  • fix(core): Only call applyDebugMetadata for error events (#​7824)
  • fix(integrations): Ensure httpclient integration works with Request (#​7786)
  • fix(node): reuseExisting does not need to call bind on domain (#​7780)
  • fix(node): Fix domain scope inheritance (#​7799)
  • fix(node): Make trpcMiddleware factory synchronous (#​7802)
  • fix(serverless): Account when transaction undefined (#​7829)
  • fix(utils): Make xhr instrumentation independent of parallel running SDK versions (#​7836)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.

@bmulholland
Copy link
Contributor

Heads up: 7.46 removes the need for adding sentry/tracing manually. See https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md/#remove-requirement-for-sentrytracing-package-since-7460

Should probably note that in the release notes, and update the docs, along with this upgrade.

@rchl
Copy link
Member

rchl commented Apr 5, 2023

Thanks for the heads up. 👍

@renovate renovate bot force-pushed the renovate/sentry-sdk branch from 94f3e7b to eeeee8b Compare April 5, 2023 14:26
@renovate renovate bot changed the title fix(deps): update sentry sdk to ^7.46.0 fix(deps): update sentry sdk to ^7.47.0 Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

size-limit report 📦

Path Size
fixture: base 364.88 KB (+0.18% 🔺)
fixture: lazy 369.28 KB (+0.18% 🔺)
fixture: tracing 381.46 KB (+0.15% 🔺)
fixture: lazy+tracing 385.83 KB (+0.15% 🔺)

@rchl
Copy link
Member

rchl commented Apr 5, 2023

Handling in #552

@renovate renovate bot changed the title fix(deps): update sentry sdk to ^7.47.0 fix(deps): update sentry sdk to ^7.47.0 - autoclosed Apr 11, 2023
@renovate renovate bot closed this Apr 11, 2023
@renovate renovate bot deleted the renovate/sentry-sdk branch April 11, 2023 07:14
@renovate renovate bot changed the title fix(deps): update sentry sdk to ^7.47.0 - autoclosed fix(deps): update sentry sdk to ^7.47.0 Apr 14, 2023
@renovate renovate bot reopened this Apr 14, 2023
@renovate renovate bot restored the renovate/sentry-sdk branch April 14, 2023 12:40
@renovate renovate bot changed the title fix(deps): update sentry sdk to ^7.47.0 fix(deps): update sentry sdk to ^7.48.0 Apr 14, 2023
@renovate renovate bot force-pushed the renovate/sentry-sdk branch from eeeee8b to 67db93e Compare April 14, 2023 13:06
@rchl rchl merged commit 30b283a into main Apr 18, 2023
@rchl rchl deleted the renovate/sentry-sdk branch April 18, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants