Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getsentry/sentry-javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9.7.0
Choose a base ref
...
head repository: getsentry/sentry-javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9.8.0
Choose a head ref
  • 11 commits
  • 65 files changed
  • 8 contributors

Commits on Mar 20, 2025

  1. node: implement new continuous profiling API spec (#15635)

    Implements
    #15636 (comment)
    and deprecates the old Sentry.profiler.start and Sentry.profiler.stop
    calls
    
    ---------
    
    Co-authored-by: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com>
    JonasBa and s1gr1d authored Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    soyuka Antoine Bluchet
    Copy the full SHA
    7100519 View commit details
  2. Merge branch 'release/9.7.0'

    getsentry-bot committed Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    soyuka Antoine Bluchet
    Copy the full SHA
    f2b861c View commit details
  3. perf(core): Add short-circuits to eventFilters integration (#15752)

    Ref: #15725
    
    - Only does the options merging once
    - Adds short circuiting for event types to avoid doing things multiple
    times/unnecessarily
    
    ---------
    
    Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
    lforst and mydea authored Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    soyuka Antoine Bluchet
    Copy the full SHA
    46eff72 View commit details
  4. feat(react): Export captureReactException method (#15746)

    This PR exports the `captureReactException` method from the React
    package, making it available as a public API. Additionally, it refactors
    the implementation to use `withScope` instead of directly passing
    context to `captureException`. This was done so that the arguments to
    `captureReactException` better align to `captureException`.
    
    Users can now directly access and use this method in their applications:
    
    ```javascript
    import * as Sentry from '@sentry/react';
    
    class ErrorBoundary extends React.Component {
      componentDidCatch(error, info) {
        Sentry.captureReactException(error, info);
      }
    
      render() {
        return this.props.children;
      }
    }
    ```
    
    The reason why `captureReactException` is named as such and not
    `captureReactErrorBoundaryException` is because it can be used in other
    scenarios as well, like with the new React 19 error APIs. Therefore it
    was generalized to just be `captureReactException`.
    AbhiPrasad authored Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    soyuka Antoine Bluchet
    Copy the full SHA
    e9248e0 View commit details
  5. Merge pull request #15756 from getsentry/master

    [Gitflow] Merge master into develop
    github-actions[bot] authored Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    soyuka Antoine Bluchet
    Copy the full SHA
    4bc89bd View commit details
  6. profiling: add platform to chunk envelope (#15758)

    We need to send the platform as part of envelope headers as this is the
    item that relay is checking to manage rate limiting. We only care about
    backend (node) and in the future frontend.
    
    @AbhiPrasad please correct me here to use the correct convention, would
    `javascript.node` be more appropriate? The only requirement really is to
    have all nodejs platform types be of a single platform type, so we dont
    need to maintain the ever growing list in relay
    JonasBa authored Mar 20, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    vinceAmstoutz Vincent Amstoutz
    Copy the full SHA
    3d63621 View commit details

Commits on Mar 21, 2025

  1. fix(node): Check for res.end before passing to Proxy (#15776)

    lforst authored Mar 21, 2025
    Copy the full SHA
    d9260cf View commit details
  2. perf(node): Short circuit flushing on Vercel only for Vercel (#15734)

    lforst authored Mar 21, 2025
    Copy the full SHA
    f4cd540 View commit details
  3. meta(changelog): Update changelog for 9.8.0

    lforst committed Mar 21, 2025
    Copy the full SHA
    6ce989c View commit details
  4. Merge pull request #15777 from getsentry/prepare-release/9.8.0

    meta(changelog): Update changelog for 9.8.0
    lforst authored Mar 21, 2025
    Copy the full SHA
    f633beb View commit details
  5. release: 9.8.0

    getsentry-bot committed Mar 21, 2025
    Copy the full SHA
    14f3eb9 View commit details
Showing with 1,777 additions and 1,280 deletions.
  1. +9 −0 CHANGELOG.md
  2. +2 −2 dev-packages/browser-integration-tests/package.json
  3. +1 −1 dev-packages/bundle-analyzer-scenarios/package.json
  4. +1 −1 dev-packages/clear-cache-gh-action/package.json
  5. +1 −1 dev-packages/e2e-tests/package.json
  6. +1 −1 dev-packages/external-contributor-gh-action/package.json
  7. +4 −4 dev-packages/node-integration-tests/package.json
  8. +1 −1 dev-packages/rollup-utils/package.json
  9. +1 −1 dev-packages/size-limit-gh-action/package.json
  10. +2 −2 dev-packages/test-utils/package.json
  11. +28 −0 docs/migration/continuous-profiling.md
  12. +1 −1 lerna.json
  13. +3 −3 packages/angular/package.json
  14. +4 −4 packages/astro/package.json
  15. +3 −3 packages/aws-serverless/package.json
  16. +2 −2 packages/browser-utils/package.json
  17. +7 −7 packages/browser/package.json
  18. +4 −4 packages/bun/package.json
  19. +2 −2 packages/cloudflare/package.json
  20. +1 −1 packages/core/package.json
  21. +71 −65 packages/core/src/integrations/eventFilters.ts
  22. +7 −0 packages/core/src/types-hoist/profiling.ts
  23. +2 −2 packages/deno/package.json
  24. +3 −3 packages/ember/package.json
  25. +3 −3 packages/eslint-config-sdk/package.json
  26. +1 −1 packages/eslint-plugin-sdk/package.json
  27. +2 −2 packages/feedback/package.json
  28. +3 −3 packages/gatsby/package.json
  29. +3 −3 packages/google-cloud-serverless/package.json
  30. +2 −2 packages/integration-shims/package.json
  31. +3 −3 packages/nestjs/package.json
  32. +7 −7 packages/nextjs/package.json
  33. +3 −3 packages/node/package.json
  34. +56 −41 packages/node/src/integrations/http/SentryHttpInstrumentationBeforeOtel.ts
  35. +12 −4 packages/node/src/integrations/http/index.ts
  36. +20 −0 packages/node/src/types.ts
  37. +6 −6 packages/nuxt/package.json
  38. +2 −2 packages/opentelemetry/package.json
  39. +3 −3 packages/profiling-node/package.json
  40. +352 −152 packages/profiling-node/src/integration.ts
  41. +1 −0 packages/profiling-node/src/spanProfileUtils.ts
  42. +2 −0 packages/profiling-node/src/utils.ts
  43. +1,048 −54 packages/profiling-node/test/integration.test.ts
  44. +0 −1 packages/profiling-node/test/{spanProfileUtils.worker.test.ts → integration.worker.test.ts}
  45. +0 −790 packages/profiling-node/test/spanProfileUtils.test.ts
  46. +4 −4 packages/react-router/package.json
  47. +3 −3 packages/react/package.json
  48. +5 −8 packages/react/src/error.ts
  49. +1 −1 packages/react/src/index.ts
  50. +25 −24 packages/react/test/errorboundary.test.tsx
  51. +5 −5 packages/remix/package.json
  52. +3 −3 packages/replay-canvas/package.json
  53. +4 −4 packages/replay-internal/package.json
  54. +1 −1 packages/replay-worker/package.json
  55. +3 −3 packages/solid/package.json
  56. +5 −5 packages/solidstart/package.json
  57. +3 −3 packages/svelte/package.json
  58. +6 −6 packages/sveltekit/package.json
  59. +6 −6 packages/tanstackstart-react/package.json
  60. +1 −1 packages/tanstackstart/package.json
  61. +2 −2 packages/types/package.json
  62. +1 −1 packages/typescript/package.json
  63. +3 −3 packages/vercel-edge/package.json
  64. +3 −3 packages/vue/package.json
  65. +3 −3 packages/wasm/package.json
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,15 @@

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

## 9.8.0

- feat(node): Implement new continuous profiling API spec ([#15635](https://github.com/getsentry/sentry-javascript/pull/15635))
- feat(profiling): Add platform to chunk envelope ([#15758](https://github.com/getsentry/sentry-javascript/pull/15758))
- feat(react): Export captureReactException method ([#15746](https://github.com/getsentry/sentry-javascript/pull/15746))
- fix(node): Check for `res.end` before passing to Proxy ([#15776](https://github.com/getsentry/sentry-javascript/pull/15776))
- perf(core): Add short-circuits to `eventFilters` integration ([#15752](https://github.com/getsentry/sentry-javascript/pull/15752))
- perf(node): Short circuit flushing on Vercel only for Vercel ([#15734](https://github.com/getsentry/sentry-javascript/pull/15734))

## 9.7.0

- feat(core): Add `captureLog` method ([#15717](https://github.com/getsentry/sentry-javascript/pull/15717))
4 changes: 2 additions & 2 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": "9.7.0",
"version": "9.8.0",
"main": "index.js",
"license": "MIT",
"engines": {
@@ -42,7 +42,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "~1.50.0",
"@sentry-internal/rrweb": "2.34.0",
"@sentry/browser": "9.7.0",
"@sentry/browser": "9.8.0",
"axios": "1.8.2",
"babel-loader": "^8.2.2",
"fflate": "0.8.2",
2 changes: 1 addition & 1 deletion dev-packages/bundle-analyzer-scenarios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/bundle-analyzer-scenarios",
"version": "9.7.0",
"version": "9.8.0",
"description": "Scenarios to test bundle analysis with",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",
2 changes: 1 addition & 1 deletion dev-packages/clear-cache-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/clear-cache-gh-action",
"description": "An internal Github Action to clear GitHub caches.",
"version": "9.7.0",
"version": "9.8.0",
"license": "MIT",
"engines": {
"node": ">=18"
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": "9.7.0",
"version": "9.8.0",
"license": "MIT",
"private": true,
"scripts": {
2 changes: 1 addition & 1 deletion dev-packages/external-contributor-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/external-contributor-gh-action",
"description": "An internal Github Action to add external contributors to the CHANGELOG.md file.",
"version": "9.7.0",
"version": "9.8.0",
"license": "MIT",
"engines": {
"node": ">=18"
8 changes: 4 additions & 4 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": "9.7.0",
"version": "9.8.0",
"license": "MIT",
"engines": {
"node": ">=18"
@@ -30,9 +30,9 @@
"@nestjs/common": "10.4.6",
"@nestjs/core": "10.4.6",
"@nestjs/platform-express": "10.4.6",
"@sentry/aws-serverless": "9.7.0",
"@sentry/core": "9.7.0",
"@sentry/node": "9.7.0",
"@sentry/aws-serverless": "9.8.0",
"@sentry/core": "9.8.0",
"@sentry/node": "9.8.0",
"@types/mongodb": "^3.6.20",
"@types/mysql": "^2.15.21",
"@types/pg": "^8.6.5",
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": "9.7.0",
"version": "9.8.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",
2 changes: 1 addition & 1 deletion dev-packages/size-limit-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/size-limit-gh-action",
"description": "An internal Github Action to compare the current size of a PR against the one on develop.",
"version": "9.7.0",
"version": "9.8.0",
"license": "MIT",
"engines": {
"node": ">=18"
4 changes: 2 additions & 2 deletions dev-packages/test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "9.7.0",
"version": "9.8.0",
"name": "@sentry-internal/test-utils",
"author": "Sentry",
"license": "MIT",
@@ -45,7 +45,7 @@
},
"devDependencies": {
"@playwright/test": "~1.50.0",
"@sentry/core": "9.7.0"
"@sentry/core": "9.8.0"
},
"volta": {
"extends": "../../package.json"
28 changes: 28 additions & 0 deletions docs/migration/continuous-profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Continuous Profiling API Changes

The continuous profiling API has been redesigned to give developers more explicit control over profiling sessions while maintaining ease of use. This guide outlines the key changes.

## New Profiling Modes

### profileLifecycle Option

We've introduced a new `profileLifecycle` option that allows you to explicitly set how profiling sessions are managed:

- `manual` (default) - You control profiling sessions using the API methods
- `trace` - Profiling sessions are automatically tied to traces

Previously, the profiling mode was implicitly determined by initialization options. Now you can clearly specify your intended behavior.

## New Sampling Controls

### profileSessionSampleRate

We've introduced `profileSessionSampleRate` to control what percentage of SDK instances will collect profiles. This is evaluated once during SDK initialization. This is particularly useful for:

- Controlling profiling costs across distributed services
- Managing profiling in serverless environments where you may only want to profile a subset of instances

### Deprecations

The `profilesSampleRate` option has been deprecated in favor of the new sampling controls.
The `profilesSampler` option hsa been deprecated in favor of manual profiler control.
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": "9.7.0",
"version": "9.8.0",
"npmClient": "yarn"
}
6 changes: 3 additions & 3 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "9.7.0",
"version": "9.8.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",
@@ -21,8 +21,8 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "9.7.0",
"@sentry/core": "9.7.0",
"@sentry/browser": "9.8.0",
"@sentry/core": "9.8.0",
"tslib": "^2.4.1"
},
"devDependencies": {
8 changes: 4 additions & 4 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/astro",
"version": "9.7.0",
"version": "9.8.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",
@@ -56,9 +56,9 @@
"astro": ">=3.x || >=4.0.0-beta || >=5.x"
},
"dependencies": {
"@sentry/browser": "9.7.0",
"@sentry/core": "9.7.0",
"@sentry/node": "9.7.0",
"@sentry/browser": "9.8.0",
"@sentry/core": "9.8.0",
"@sentry/node": "9.8.0",
"@sentry/vite-plugin": "^2.22.6"
},
"devDependencies": {
6 changes: 3 additions & 3 deletions packages/aws-serverless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/aws-serverless",
"version": "9.7.0",
"version": "9.8.0",
"description": "Official Sentry SDK for AWS Lambda and AWS Serverless Environments",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/serverless",
@@ -68,8 +68,8 @@
"@opentelemetry/instrumentation": "^0.57.2",
"@opentelemetry/instrumentation-aws-lambda": "0.50.3",
"@opentelemetry/instrumentation-aws-sdk": "0.49.1",
"@sentry/core": "9.7.0",
"@sentry/node": "9.7.0",
"@sentry/core": "9.8.0",
"@sentry/node": "9.8.0",
"@types/aws-lambda": "^8.10.62"
},
"devDependencies": {
4 changes: 2 additions & 2 deletions packages/browser-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-utils",
"version": "9.7.0",
"version": "9.8.0",
"description": "Browser Utilities for all Sentry JavaScript SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser-utils",
@@ -39,7 +39,7 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.7.0"
"@sentry/core": "9.8.0"
},
"scripts": {
"build": "run-p build:transpile build:types",
14 changes: 7 additions & 7 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/browser",
"version": "9.7.0",
"version": "9.8.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",
@@ -39,14 +39,14 @@
"access": "public"
},
"dependencies": {
"@sentry-internal/browser-utils": "9.7.0",
"@sentry-internal/feedback": "9.7.0",
"@sentry-internal/replay": "9.7.0",
"@sentry-internal/replay-canvas": "9.7.0",
"@sentry/core": "9.7.0"
"@sentry-internal/browser-utils": "9.8.0",
"@sentry-internal/feedback": "9.8.0",
"@sentry-internal/replay": "9.8.0",
"@sentry-internal/replay-canvas": "9.8.0",
"@sentry/core": "9.8.0"
},
"devDependencies": {
"@sentry-internal/integration-shims": "9.7.0",
"@sentry-internal/integration-shims": "9.8.0",
"fake-indexeddb": "^4.0.1"
},
"scripts": {
8 changes: 4 additions & 4 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/bun",
"version": "9.7.0",
"version": "9.8.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",
@@ -39,9 +39,9 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.7.0",
"@sentry/node": "9.7.0",
"@sentry/opentelemetry": "9.7.0"
"@sentry/core": "9.8.0",
"@sentry/node": "9.8.0",
"@sentry/opentelemetry": "9.8.0"
},
"devDependencies": {
"bun-types": "latest"
4 changes: 2 additions & 2 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/cloudflare",
"version": "9.7.0",
"version": "9.8.0",
"description": "Official Sentry SDK for Cloudflare Workers and Pages",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare",
@@ -49,7 +49,7 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.7.0"
"@sentry/core": "9.8.0"
},
"peerDependencies": {
"@cloudflare/workers-types": "^4.x"
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/core",
"version": "9.7.0",
"version": "9.8.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",
Loading