Skip to content
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

Create server runtime Client in @sentry/core #8693

Closed
5 tasks done
mydea opened this issue Aug 1, 2023 · 7 comments
Closed
5 tasks done

Create server runtime Client in @sentry/core #8693

mydea opened this issue Aug 1, 2023 · 7 comments
Assignees

Comments

@mydea
Copy link
Member

mydea commented Aug 1, 2023

Kind of extracted from #8087, and related to #8688, create a new ServerRuntimeClient (name tbd) as well as an init in @sentry/core. The idea is that this can be called from any JS runtime, so browser, node, edge, ... so it should only contain stuff that works everywhere.

For the first step, we can just implement this based on the EdgeClient from Next.js, as well as an init() method based on the edge init.

In follow up steps, we can then actually extend from this for node/serverless SDKs, and re-use as much as possible.

Tasks

@AbhiPrasad
Copy link
Member

Why core client over base client?

We want base client to be as minimal as possible to save on bundle size in browser, hence the previous proposal to have a wintercg client that only was used for backend runtimes.

@mydea
Copy link
Member Author

mydea commented Aug 1, 2023

Why core client over base client?

We want base client to be as minimal as possible to save on bundle size in browser, hence the previous proposal to have a wintercg client that only was used for backend runtimes.

Based on the current "EdgeClient" implementation, I didn't see a lot that wouldn't go into the browser client (but TBH I just skimmed this, so maybe missed something). Do you think there is stuff in there that wouldn't work (or we wouldn't want) in browser? If so, then yes we should extract this into a dedicated init only for backend runtimes!

@mydea
Copy link
Member Author

mydea commented Aug 1, 2023

Otherwise, based on talk with @kamilogorek , let's go with a new package like @sentry/js that we may end up also using with browser, or not if it doesn't make sense? We don't really want to expose the WinterGC naming in the package I think, so we'd need to use something else that makes sense 😅

Or another name idea: @sentry/server?

@AbhiPrasad
Copy link
Member

Remix uses https://www.npmjs.com/package/@remix-run/server-runtime, I think @sentry/server-runtime could work well here!

Based on the current "EdgeClient" implementation, I didn't see a lot that wouldn't go into the browser client

The main thing at the moment is crons, but I can see other stuff also getting added (request mode sessions, metrics APIs, etc.).

@mydea
Copy link
Member Author

mydea commented Aug 1, 2023

server-runtime sounds good to me as well! I'll update the issue (we can still tweak it more) 🚀

@AbhiPrasad
Copy link
Member

After some discussion with @timfish and @lforst it was decided that a separate package is not needed. Instead we can just put the Server runtime client (name tbd) into @sentry/core.

@AbhiPrasad AbhiPrasad changed the title Create @sentry/server-runtime with basic Client & init Create server runtime Client & init in @sentry/core Aug 31, 2023
@timfish timfish changed the title Create server runtime Client & init in @sentry/core Create server runtime Client in @sentry/core Sep 14, 2023
@AbhiPrasad
Copy link
Member

Going to close this as we're not going to do the serverless change and we're going to track Sveltekit in another issue.

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

No branches or pull requests

4 participants