Skip to content

fix: Null-check sentryClient._options #736

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
Mar 20, 2025
Merged

fix: Null-check sentryClient._options #736

merged 1 commit into from
Mar 20, 2025

Conversation

BYK
Copy link
Member

@BYK BYK commented Mar 20, 2025

We got a report of an error when we tried to set sentryClient._options.tracesSampler implying that sentryClient._options might be null or undefined. This patch adds protection around that.

We got a report of an error when we tried to set `sentryClient._options.tracesSampler` implying that `sentryClient._options` might be `null` or `undefined`. This patch adds protection around that.
Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 8:55pm

@BYK BYK enabled auto-merge (squash) March 20, 2025 20:55
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 31.77%. Comparing base (2c2ad9f) to head (2577e69).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/overlay/src/integrations/sentry/index.ts 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #736      +/-   ##
==========================================
- Coverage   31.80%   31.77%   -0.04%     
==========================================
  Files          95       95              
  Lines        5951     5957       +6     
  Branches      118      118              
==========================================
  Hits         1893     1893              
- Misses       4058     4064       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BYK BYK merged commit d3a2f0a into main Mar 20, 2025
15 of 17 checks passed
@BYK BYK deleted the wopoqxrqsoxr branch March 20, 2025 21:01
BYK pushed a commit that referenced this pull request Apr 17, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/[email protected]

### Minor Changes

- feat: Keep profile spans collapsed
([#737](#737))

### Patch Changes

- fix: Null-check sentryClient.\_options
([#736](#736))

-   Updated dependencies

\[[`3d569f30fb746d90ecabaac35d23d980360ea99c`](3d569f3),

[`d3a2f0a0fae9074802b0551f3e1662833c1423c9`](d3a2f0a),

[`d0315bc2ead9ccea722cc73c6b5fd7d9fed3f4a4`](d0315bc)]:
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Minor Changes

- feat: Keep profile spans collapsed
([#737](#737))

### Patch Changes

- fix: Null-check sentryClient.\_options
([#736](#736))

-   Updated dependencies

\[[`3d569f30fb746d90ecabaac35d23d980360ea99c`](3d569f3),

[`7ea7de17b7ccf9f0c8edb8b413176d2f3482780c`](7ea7de1),

[`263ba283efa247e05a022d7f1305cbf819e3e783`](263ba28),

[`7ac9fd255cfe85d66e79d632e1d309c3e88d8092`](7ac9fd2),

[`a76b2dadb28ce8699c80fc81b709050655bd4629`](a76b2da),

[`d3a2f0a0fae9074802b0551f3e1662833c1423c9`](d3a2f0a),

[`f2a48b05a41f80e08d1666247f7ccae60bc3d9e7`](f2a48b0),

[`6d26f0d21b3ae75e3d81e48ceb2d8f727a94420f`](6d26f0d),

[`a8f632357d9dcc46187b00724c14dd4423dfa467`](a8f6323),

[`9888dbfc6778de910a2aeae9f3e86f0b2f716a18`](9888dbf),

[`ced3e736dfef15d368cac202a10eec4eba7508be`](ced3e73)]:
    -   @spotlightjs/[email protected]
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Minor Changes

- feat: Keep profile spans collapsed
([#737](#737))

- Swap "Errors" and "Explore" tab places, making "Explore" the default.
It makes more sense this way as there is almost
([#758](#758)) guaranteed to
have traces in a good setup but not really
    errors.

- Restructured Sentry integration tabs and components
([#765](#765))

-   -   \#731: Search Bar sticky and fixed overflow across the overlay.
        ([#740](#740))

- Include filter functionality when searching spans
([#747](#747))

### Patch Changes

- Fixed parsing of envelope data.
([#751](#751))

- fix: Null-check sentryClient.\_options
([#736](#736))

- format node internals correctly in stacktrace
([#739](#739))

-   Fixed #738 ([#741](#741))

## @spotlightjs/[email protected]

### Minor Changes

- feat: Keep profile spans collapsed
([#737](#737))

### Patch Changes

- fix: Null-check sentryClient.\_options
([#736](#736))

- Remove obsolete packages from dependencies
([#761](#761))

-   Updated dependencies

\[[`3d569f30fb746d90ecabaac35d23d980360ea99c`](3d569f3),

[`7ea7de17b7ccf9f0c8edb8b413176d2f3482780c`](7ea7de1),

[`263ba283efa247e05a022d7f1305cbf819e3e783`](263ba28),

[`7ac9fd255cfe85d66e79d632e1d309c3e88d8092`](7ac9fd2),

[`a76b2dadb28ce8699c80fc81b709050655bd4629`](a76b2da),

[`d3a2f0a0fae9074802b0551f3e1662833c1423c9`](d3a2f0a),

[`f2a48b05a41f80e08d1666247f7ccae60bc3d9e7`](f2a48b0),

[`6d26f0d21b3ae75e3d81e48ceb2d8f727a94420f`](6d26f0d),

[`a8f632357d9dcc46187b00724c14dd4423dfa467`](a8f6323),

[`9888dbfc6778de910a2aeae9f3e86f0b2f716a18`](9888dbf),

[`ced3e736dfef15d368cac202a10eec4eba7508be`](ced3e73)]:
    -   @spotlightjs/[email protected]
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Patch Changes

- use nanosecond timestamp for captured filenames
([#776](#776))

- Improve DX by always showing the Spotlight URL, even if the sidecar
was already running. Makes it easy to
cmd/ctrl+click ([#748](#748))
and open in browser.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant