Skip to content

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

@heddendorp

Description

@heddendorp

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions