Skip to content

[Next] Ensure the wizard cleans up old configuration file when creating new one #930

Closed
getsentry/sentry-javascript
#15971
@shellmayr

Description

@shellmayr

When the wizard adds the new instrumentation-client.ts file, it does not remove the old sentry.client.config.ts, which during dogfooding broke instrumentation even for errors. Our wizard should make sure that these changes do not break instrumentation and clean up unused / deprecated files (even if just by renaming them to [name]-deprecated.[suffix].

Reproduction:

  1. Setup sentry using wizard in Next.js project
  2. Setup sourcemaps using wizard in Next.js project

Actual Outcome:

  1. The project contains both instrumentation-client.ts and sentry.client.config.ts
  2. Sentry seems to crash when both instrumentation files are found (example)
  3. As an effect of this, Sentry does not capture exceptions when this happens

Expected Outcome:
I only have instrumentation-client.ts, or both files, but instrumentation is not broken by this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions