Skip to content

fix(nextjs): Fix version detection and option insertion logic for clientTraceMetadata option#12323

Merged
lforst merged 2 commits intogetsentry:developfrom
ykzts:fix/client-trace-metadata
Jun 3, 2024
Merged

fix(nextjs): Fix version detection and option insertion logic for clientTraceMetadata option#12323
lforst merged 2 commits intogetsentry:developfrom
ykzts:fix/client-trace-metadata

Conversation

@ykzts
Copy link
Copy Markdown
Contributor

@ykzts ykzts commented Jun 2, 2024

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

When using Next.js v15.0.0-rc.0 or v15.0.0-canary.6, withSentryConfig does not add clientTraceMetadata to experimental. This is because both rc and canary releases have a minor version of 0 and are always treated as false.

Copy link
Copy Markdown
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We had the same thought 😂 #12324

@lforst
Copy link
Copy Markdown
Contributor

lforst commented Jun 3, 2024

Added functionality to merge clientTraceMetadata in case it is already present.

@lforst lforst changed the title fix(nextjs): Add clientTraceMetadata for Next.js v15.0 fix(nextjs): Fix version detection and option insertion logic for clientTraceMetadata option Jun 3, 2024
@lforst lforst merged commit 4172e16 into getsentry:develop Jun 3, 2024
@ykzts ykzts deleted the fix/client-trace-metadata branch June 3, 2024 05:58
c298lee pushed a commit that referenced this pull request Jun 4, 2024
…ientTraceMetadata` option (#12323)

Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
@AbhiPrasad
Copy link
Copy Markdown
Contributor

Released with https://github.com/getsentry/sentry-javascript/releases/tag/8.8.0 - thanks for the PR @ykzts!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants