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(core): Return client from init method by chargome · Pull Request #12585 · getsentry/sentry-javascript

Conversation

@chargome

@chargome chargome commented Jun 20, 2024

Copy link
Copy Markdown
Member

fixes #12495

Sorry, something went wrong.

Uh oh!

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

All reactions
@chargome
chargome requested review from a team, AbhiPrasad and s1gr1d and removed request for a team June 20, 2024 14:34
AbhiPrasad
AbhiPrasad reviewed Jun 20, 2024
View reviewed changes
Comment thread packages/node/src/sdk/index.ts Outdated
* Initialize Sentry for Node.
*/
export function init(options: NodeOptions | undefined = {}): void {
export function init(options: NodeOptions | undefined = {}): NodeClient {

@AbhiPrasad AbhiPrasad Jun 20, 2024

Copy link
Copy Markdown
Contributor

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: Although we always return a top-level client here, making this NodeClient | undefined gives us more flexibility in the future for top-level API without making breaking changes. It also allows us to align the type signature everywhere.

Sorry, something went wrong.

Uh oh!

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

chargome reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chargome chargome Jun 20, 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.

Yes you're right, will update that!

Sorry, something went wrong.

Uh oh!

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

All reactions
@chargome
chargome marked this pull request as draft June 20, 2024 14:44
@github-actions

github-actions Bot commented Jun 20, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.22 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) 33.31 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.09 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.42 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.15 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.34 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.21 KB (+0.01% 🔺)
@sentry/browser (incl. metrics) 26.5 KB (+0.03% 🔺)
@sentry/browser (incl. Feedback) 38.45 KB (+0.02% 🔺)
@sentry/browser (incl. sendFeedback) 26.85 KB (+0.03% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.45 KB (+0.02% 🔺)
@sentry/react 24.97 KB (+0.04% 🔺)
@sentry/react (incl. Tracing) 36.36 KB (+0.03% 🔺)
@sentry/vue 26.33 KB (+0.02% 🔺)
@sentry/vue (incl. Tracing) 35.17 KB (+0.02% 🔺)
@sentry/svelte 22.36 KB (+0.03% 🔺)
CDN Bundle 23.42 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing) 35.05 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.18 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.38 KB (+0.01% 🔺)
CDN Bundle - uncompressed 68.8 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 103.66 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.13 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.79 KB (+0.02% 🔺)
@sentry/nextjs (client) 36.24 KB (+0.02% 🔺)
@sentry/sveltekit (client) 33.95 KB (+0.03% 🔺)
@sentry/node 112.99 KB (+0.01% 🔺)
@sentry/node - without tracing 90.39 KB (+0.01% 🔺)
@sentry/aws-serverless 99.48 KB (+0.01% 🔺)
All reactions

Sorry, something went wrong.

Uh oh!

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

@chargome
chargome marked this pull request as ready for review June 21, 2024 07:41
@chargome
chargome requested a review from AbhiPrasad June 21, 2024 07:42
@chargome chargome self-assigned this Jun 21, 2024
mydea
mydea approved these changes Jun 21, 2024
View reviewed changes

@mydea mydea 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.

I think it would be nice to eventually get to a place where this does not need to return Client | undefined as it makes stuff less ergonomic for users, but it's fine for now and we can make the return type stricter later if we want. So let's go with this for now! 👍

Sorry, something went wrong.

Uh oh!

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

All reactions
s1gr1d
s1gr1d approved these changes Jun 21, 2024
View reviewed changes

@s1gr1d s1gr1d 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.

Looks good!

Sorry, something went wrong.

Uh oh!

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

All reactions
@chargome chargome changed the title feat: Return client from init method feat(core): Return client from init method Jun 21, 2024
chargome added 17 commits June 21, 2024 10:30
@chargome
feat(core): return sentry client from init
62c454d
@chargome
feat(node): return node client from init
62b136f
@chargome
feat(browser): return client from init
51ef0ba
@chargome
feat(angular): return client from init
963846f
@chargome
feat(astro): return client from init
e9e6270
@chargome
feat(aws-serverless): return client from init
b8728bd
@chargome
feat(bun): return client from init
d1ae59b
@chargome
feat(deno): return client from init
9df3c08
@chargome
feat(ember): return client from init
80b2746
@chargome
feat(react): return client from init
e6c8981
@chargome
feat(gatsby): return client from init
de33a97
@chargome
feat(google-cloud-serverless): return client from init
84ff448
@chargome
feat(nextjs): return client from init
a140163
@chargome
feat(remix): return client from init
360591e
@chargome
feat(solid): return client from init
1332d16
@chargome
feat(svelte): return client from init
44c4b0c
@chargome
feat(sveltekit): return client from init
c6aa5cc
chargome added 5 commits June 21, 2024 10:30
@chargome
feat(vercel-edge): return client from init
c5ed65f
@chargome
feat(vue): return client from init
b065906
@chargome
fix: lint
9e87009
@chargome
fix(bun): biome check
6e8b3d3
@chargome
feat: update node client return type
febc201
@chargome
chargome force-pushed the cg/return-client-from-init branch from 34d8355 to febc201 Compare June 21, 2024 08:31
@chargome
chargome merged commit 012c349 into develop Jun 21, 2024
@chargome
chargome deleted the cg/return-client-from-init branch June 21, 2024 08:54
@chargome chargome mentioned this pull request Jun 21, 2024
docs(js): use client from init method in js snippets getsentry/sentry-docs#10460
Merged
3 of 6 tasks
@q1blue q1blue mentioned this pull request Jul 16, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.12.0 https-quantumblockchainai-atlassian-net/ossinsight#764
Open
@voidedstarlight voidedstarlight mentioned this pull request Jul 17, 2024
[Snyk] Upgrade @sentry/browser from 8.11.0 to 8.12.0 climatechangeinformation-org/website#162
Closed
This was referenced Jul 17, 2024
[Snyk] Upgrade @sentry/browser from 8.11.0 to 8.12.0 mong/mongts#2782
Closed
[Snyk] Upgrade @sentry/react from 8.11.0 to 8.12.0 mong/mongts#2783
Closed
@q1blue q1blue mentioned this pull request Jul 18, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.13.0 https-quantumblockchainai-atlassian-net/ossinsight#773
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Jul 21, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.13.0 FengShangWuQi/fengshangwuqi.github.io#1909
Closed
This was referenced Jul 26, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.14.0 https-quantumblockchainai-atlassian-net/ossinsight#781
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.15.0 https-quantumblockchainai-atlassian-net/ossinsight#783
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.16.0 https-quantumblockchainai-atlassian-net/ossinsight#787
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.17.0 https-quantumblockchainai-atlassian-net/ossinsight#791
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mydea mydea mydea approved these changes
@s1gr1d s1gr1d s1gr1d approved these changes
@AbhiPrasad AbhiPrasad Awaiting requested review from AbhiPrasad

Uh oh!

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

Assignees

@chargome chargome

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Return client from init methods

Uh oh!

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

4 participants

@chargome @mydea @AbhiPrasad @s1gr1d
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.