Skip to content

NextJS Profiling on Server Side #56153

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

Closed
radekwarisch opened this issue Sep 13, 2023 · 5 comments
Closed

NextJS Profiling on Server Side #56153

radekwarisch opened this issue Sep 13, 2023 · 5 comments

Comments

@radekwarisch
Copy link

Problem Statement

Hey Team, I have a question regarding Profiling feature (https://docs.sentry.io/platforms/node/profiling/).
We would like to setup NextJS profiling for checking for bottlenecks, but on the server side (I see there is a guide, but it seems to cover only client side: https://docs.sentry.io/platforms/javascript/guides/nextjs/profiling).
I do not see how to set it up for server side for NextJS?

Solution Brainstorm

Guide on connecting profiling to NextJS with server side would be great.

Product Area

Performance

@getsantry
Copy link
Contributor

getsantry bot commented Sep 13, 2023

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Sep 13, 2023

Routing to @getsentry/product-owners-profiling for triage ⏲️

@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 Sep 13, 2023
@JonasBa
Copy link
Member

JonasBa commented Sep 13, 2023

@radekwarisch we support both nodejs and browser profiling (you actually linked to them in your description). There is no one single package to manage this so you need to follow the setup guide for each platform separately (for nodejs https://docs.sentry.io/platforms/node/profiling/) and for browser js (https://docs.sentry.io/platforms/javascript/guides/nextjs/profiling/). You will need to install @sentry/browser and @sentry/node and @sentry/profiling node to make this work.

@radekwarisch
Copy link
Author

@JonasBa thanks - in which NextJS file should I carry out NodeJS setup? Is it next.config.js or some different file?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Sep 20, 2023
@JonasBa
Copy link
Member

JonasBa commented Sep 21, 2023

@radekwarisch I recommend you follow https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ or use our automated wizard at https://docs.sentry.io/platforms/javascript/guides/nextjs/

You will need to install @sentry/profiling-node and add it to sentry.server.config.js to enable server side profiling. For client side profiling you'll need to do similar, but add the config to sentry.client.config.js and then enable profiling - see https://docs.sentry.io/platforms/javascript/profiling/ for how to enable it.

I will need to update our docs and the setup wizard. We could automatically setup profiling using our wizard, this feels like a quick win. Let me know if you have any questions, happy to help

@getsantry getsantry bot removed the status in GitHub Issues with 👀 Sep 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants