Skip to content

@sentry/nextjs does not search for instrumentation-client.js #16635

Closed as duplicate

Description

@Jimmy89

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

9.30.0

Framework Version

Nextjs 15.3.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

While reviewing the sentry/nextjs code in the search of a potential bug I stumbled upon this line of code:

The .ts file is added twice, where one must refer to the .js file.

For a quick overview:

  const potentialInstrumentationClientFileLocations = [
    ['src', 'instrumentation-client.ts'],
    ['src', 'instrumentation-client.js'],
    ['instrumentation-client.ts'],
    ['instrumentation-client.ts'], <-- This must be `.js`
  ];

Steps to Reproduce

See example

Expected Result

That instrumentation-client.js are also 'seen' by the sentry webpack code.

Actual Result

instrumentation-client.js is not scanned.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 18, 2025
  2. andreiborza commented on Jun 18, 2025

    @andreiborza
    Member

    Hey @Jimmy89, thanks for raising this and figuring it out. Looks like that's indeed the issue, do you want to contribute this maybe? Otherwise we can take care of it of course.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 18, 2025
  4. mydea commented on Jun 18, 2025

    @mydea
    Member

    This is a duplicate of #16634 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions