-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
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! |
Otherwise, based on talk with @kamilogorek , let's go with a new package like Or another name idea: |
Remix uses https://www.npmjs.com/package/@remix-run/server-runtime, I think
The main thing at the moment is crons, but I can see other stuff also getting added (request mode sessions, metrics APIs, etc.). |
server-runtime sounds good to me as well! I'll update the issue (we can still tweak it more) 🚀 |
CoreClient
& Core.init
@sentry/server-runtime
with basic Client & init
@sentry/server-runtime
with basic Client & init@sentry/core
@sentry/core
@sentry/core
Going to close this as we're not going to do the serverless change and we're going to track Sveltekit in another issue. |
Kind of extracted from #8087, and related to #8688, create a new
ServerRuntimeClient
(name tbd) as well as aninit
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
ServerRuntimeClient
#8930EdgeClient
and useServerRuntimeClient
#8932ServerRuntimeClient
rather thanBaseClient
#8933The text was updated successfully, but these errors were encountered: