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

Sentry can't instument express if it is bundled #15017

Open
3 tasks done
heddendorp opened this issue Jan 14, 2025 · 3 comments
Open
3 tasks done

Sentry can't instument express if it is bundled #15017

heddendorp opened this issue Jan 14, 2025 · 3 comments
Labels
Package: node Issues related to the Sentry Node SDK

Comments

@heddendorp
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.48.0

Framework Version

Express 4.21.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

Use sentry for node in an angular ssr appllication that is based on express.

Expected Result

Sentry can instrument express

Actual Result

Sentry comlains that express is not instrumented even through the instrument file was preloaded with --import.

My guess is that since angular bundles express into the server, sentry misses out on the import that it tries to wrap, leading to it not instrumenting express. I would be thankful for some ideas on how this could be improved.
Also if it is just adding a bunch of middlewares and such

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 14, 2025
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Jan 14, 2025
@s1gr1d
Copy link
Member

s1gr1d commented Jan 15, 2025

Hello, thanks for writing in! In order to know what exactly is the issue here we would need some more context about your project. Can you please share a small reproduction example and share how you set up Sentry like with your Sentry.init.

@heddendorp
Copy link
Author

The example would be https://github.com/evorto-app/app
But my guess is that this would also happen on a freshly generated angular application with ssr.
I can look into setting that up as well if this is not sufficient reference.
The relevant line is probably
https://github.com/evorto-app/app/blob/2dea0a4358d7d2a33562d1803e5f076688152560/Dockerfile#L29

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 15, 2025
@s1gr1d
Copy link
Member

s1gr1d commented Jan 16, 2025

Thanks for providing the example!

We might just need docs for this as we have an open issue for this (putting it here for reference): getsentry/sentry-docs#10416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK
Projects
Status: No status
Development

No branches or pull requests

2 participants