GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Add spotlightBrowser integration by BYK · Pull Request #13263 · getsentry/sentry-javascript

Conversation

@BYK

@BYK BYK commented Aug 7, 2024

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Burak Yigit Kaya
feat: Add spotlightBrowser integration
1b83a36
Lms24
Lms24 reviewed Aug 7, 2024
View reviewed changes
Comment thread packages/browser/src/integrations/spotlight.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser/src/integrations/spotlight.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser/src/integrations/spotlight.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser/src/sdk.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser/src/integrations/spotlight.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/node/src/integrations/spotlight.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/types/src/options.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Burak Yigit Kaya added 3 commits August 7, 2024 15:27
Burak Yigit Kaya
rename to sentryBrowserIntegration
81c7ba2
Burak Yigit Kaya
remove obsolete setupOnce() method
0deb983
Burak Yigit Kaya
remove obsolete lines from processEvent
2954e41
This was referenced Aug 7, 2024
Improve e2e integration with stacks such as Rails getsentry/spotlight#468
Closed
Export SpotlightBrowser Sentry integration getsentry/spotlight#403
Closed
Burak Yigit Kaya added 8 commits August 7, 2024 18:27
Burak Yigit Kaya
Merge branch 'develop' into byk/feat/spotlight-browser-extension
fdf4eac
Burak Yigit Kaya
revert spotlight:true related changes
f88efc5
Burak Yigit Kaya
Merge branch 'develop' into byk/feat/spotlight-browser-extension
5965324
Burak Yigit Kaya
fix spotlight browser init when no DSN was set
2097073
Burak Yigit Kaya
bump size limit for next.js client by 30 bytes
f31f7d8
Burak Yigit Kaya
Merge branch 'develop' into byk/feat/spotlight-browser-extension
074dccd
Burak Yigit Kaya
try to fix node 14 integration tests
cf26dad
Burak Yigit Kaya
Merge branch 'develop' into byk/feat/spotlight-browser-extension
50fcda5
@BYK
BYK marked this pull request as ready for review August 8, 2024 13:44
@BYK
BYK requested a review from Lms24 August 8, 2024 13:44
Burak Yigit Kaya
align SpotlightBrowser fail reset with node version
ff233c7
Lms24
Lms24 reviewed Aug 9, 2024
View reviewed changes

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes! One question but otherwise it looks good to me!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/baseclient.ts
// don't support the `spotlight` option there and rely on the users
// adding the `spotlightBrowserIntegration()` to their integrations which
// wouldn't get initialized with the check below when there's no DSN set.
this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))

@Lms24 Lms24 Aug 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine given spotlight is pretty much a one-off at the moment. Another option would be to adjust our integrations API to acomodate for such scenarios, say in an afterSdkInit hook that's aways invoked, regardless if the SDK is enabled or not. Will bring this up with the team but let's not block the PR on this as it's easily changeable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@BYK BYK Aug 9, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I thought about adding a special property like forced or something like that on the integration but I'll leave that debate to you folks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/node/src/sdk/index.ts Outdated
const scope = getCurrentScope();
scope.update(options.initialScope);

if (options.spotlight && options.integrations.some(({ name }) => name !== SPOTLIGHT_INTEGRATION_NAME)) {

@Lms24 Lms24 Aug 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: My brain is a bit fried already today but the the .some check isn't correct right? We only want to add the integration if it hasn't been added to options.integrations before. I think we can use .find instead

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@BYK BYK Aug 9, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I got confused! Fix coming out that said I prefer .some() to .find() as we don't really need the first found value, we just want to check if there is anything that matches the criteria. They probably work the same underneath but they don't have as you can optimize .some() in different ways if you wanted to.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/node/src/sdk/index.ts
if (isEnabled(client)) {
client.init();
}
client.init();

@Lms24 Lms24 Aug 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit scared when I saw this but as far as I can tell we don't extend the init from BaseClient in the derived client classes. Given we guard the base client init implementation this should be fine.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@BYK BYK Aug 9, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event if we extend, aren't we supposed to call super()? I think that's the responsibility of downstream class implementors and not something we should be worried about here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Lms24 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Burak Yigit Kaya
fix logic error
f89533f
@BYK
BYK requested a review from Lms24 August 9, 2024 17:17
BYK
BYK commented Aug 9, 2024
View reviewed changes
Comment thread packages/node/src/sdk/index.ts
scope.update(options.initialScope);

if (options.spotlight && options.integrations.some(({ name }) => name !== SPOTLIGHT_INTEGRATION_NAME)) {
if (options.spotlight && !options.integrations.some(({ name }) => name === SPOTLIGHT_INTEGRATION_NAME)) {

@BYK BYK Aug 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also do

Suggested change
if (options.spotlight && !options.integrations.some(({ name }) => name === SPOTLIGHT_INTEGRATION_NAME)) {
if (options.spotlight && options.integrations.every(({ name }) => name !== SPOTLIGHT_INTEGRATION_NAME)) {

But I think the current version expresses the intent a bit more clearly: if there are no integrations matching this name, add it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lms24 Lms24 Aug 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with any of these, as long as we only add the integration if it isn't yet present 👍
Thanks for fixing!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BYK reacted with rocket emoji
All reactions
  • 🚀 1 reaction
Lms24
Lms24 approved these changes Aug 12, 2024
View reviewed changes

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes! Looks fine to me!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/node/src/sdk/index.ts
scope.update(options.initialScope);

if (options.spotlight && options.integrations.some(({ name }) => name !== SPOTLIGHT_INTEGRATION_NAME)) {
if (options.spotlight && !options.integrations.some(({ name }) => name === SPOTLIGHT_INTEGRATION_NAME)) {

@Lms24 Lms24 Aug 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with any of these, as long as we only add the integration if it isn't yet present 👍
Thanks for fixing!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BYK reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@Lms24
Lms24 merged commit 69a5e8e into getsentry:develop Aug 12, 2024
@BYK
BYK deleted the byk/feat/spotlight-browser-extension branch August 12, 2024 14:35
This was referenced Sep 4, 2024
[Snyk] Upgrade @sentry/node from 8.22.0 to 8.26.0 Aam-Digital/account-backend#42
Closed
[Snyk] Upgrade @sentry/node from 8.22.0 to 8.26.0 Aam-Digital/replication-backend#158
Closed
@q1blue q1blue mentioned this pull request Sep 7, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.26.0 https-quantumblockchainai-atlassian-net/ossinsight#846
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Sep 8, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.26.0 FengShangWuQi/fengshangwuqi.github.io#1919
Closed
@bagulm123 bagulm123 mentioned this pull request Sep 8, 2024
[Snyk] Upgrade: , , chart.js, classnames, cytoscape, typescript bagulm123/komiser#18
Open
@KeeghanM KeeghanM mentioned this pull request Sep 12, 2024
[Snyk] Upgrade: , , , , , , next, posthog-js, posthog-node, react-chessboard, stripe KeeghanM/chess-training-app#94
Merged
This was referenced Sep 13, 2024
[Snyk] Upgrade: , , chart.js, classnames, cytoscape, next, typescript bagulm123/komiser#19
Open
[Snyk] Upgrade: , , , chart.js, classnames, cytoscape, next, typescript bagulm123/komiser#20
Open
@onsails onsails mentioned this pull request Sep 18, 2024
[Snyk] Upgrade: , , , next haqq-network/islamic-website#37
Open
@mohamed-helmy22020 mohamed-helmy22020 mentioned this pull request Sep 18, 2024
[Snyk] Upgrade @sentry/nextjs from 8.26.0 to 8.27.0 mohamed-helmy22020/banking#4
Open
@gokulk16 gokulk16 mentioned this pull request Sep 23, 2024
[Snyk] Upgrade: , gokulk16/type-to-calculate-web#40
Closed
@q1blue q1blue mentioned this pull request Sep 24, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.27.0 https-quantumblockchainai-atlassian-net/ossinsight#893
Open
This was referenced Sep 24, 2024
[Snyk] Upgrade @sentry/browser from 8.25.0 to 8.27.0 gokulk16/type-to-calculate-web#42
Closed
[Snyk] Upgrade @sentry/browser from 8.25.0 to 8.28.0 gokulk16/type-to-calculate-web#44
Closed
@FengShangWuQi FengShangWuQi mentioned this pull request Sep 27, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.28.0 FengShangWuQi/fengshangwuqi.github.io#1923
Closed
This was referenced Sep 27, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.28.0 https-quantumblockchainai-atlassian-net/ossinsight#899
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.29.0 https-quantumblockchainai-atlassian-net/ossinsight#904
Open
@bagulm123 bagulm123 mentioned this pull request Oct 1, 2024
[Snyk] Upgrade @sentry/react from 8.22.0 to 8.29.0 bagulm123/komiser#23
Open
@q1blue q1blue mentioned this pull request Oct 1, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.30.0 https-quantumblockchainai-atlassian-net/ossinsight#909
Open
@KeeghanM KeeghanM mentioned this pull request Oct 3, 2024
[Snyk] Upgrade @sentry/react from 8.26.0 to 8.30.0 KeeghanM/chess-training-app#99
Merged
BYK added a commit that referenced this pull request Nov 7, 2024
@BYK
fix(spotlight): Export spotlightBrowserIntegration from the main brow…
4504de9
…ser package

Follow up to #13263 where we forgot to export it from the main package 🤦
@BYK BYK mentioned this pull request Nov 7, 2024
fix(spotlight): Export spotlightBrowserIntegration from the main browser package #14208
Merged
BYK added a commit that referenced this pull request Nov 8, 2024
@BYK
fix(spotlight): Export spotlightBrowserIntegration from the main brow…
cb1f001
…ser package (#14208)

Follow up to #13263 where we forgot to export it from the main package
:facepalm:
@coderabbitai coderabbitai Bot mentioned this pull request Apr 13, 2026
refactor: update dependencies and remove unused components Gravender/boardgames#188
Merged
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Lms24 Lms24 Lms24 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@BYK @Lms24
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.