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

fix(nextjs): Add tracing extensions in all serverside wrappers #9537

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Nov 13, 2023

Fixes issues reported in #9461

This will add addTracingExtension() calls to all auto instrumentation wrappers because they will attempt to start transactions and if the tracing extensions are not set the sdk will print an ugly warning.

This is only serverside so bundlesize shouldn't matter here.

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

This seems fine, maybe we find a way to abstract this away - e.g. can we export a wrapping startTransaction that basically does:

import { startTransaction as _startTransaction, addTracingExtensions } from '@sentry/core';

export function startTransaction() {
  addTracingExtensions();
  return _startTransaction(...arguments);
}

And use this everywhere (or something like this)? Not sure how easy that would be in the next architecture...!

@lforst
Copy link
Member Author

lforst commented Nov 13, 2023

@mydea This doesn't seem like a bad idea. Maybe we have these wrappers for our server SDKs.

@lforst lforst merged commit 27686ba into develop Nov 13, 2023
54 checks passed
@lforst lforst deleted the lforst-add-tracing-extensions branch November 13, 2023 16:06
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.

None yet

2 participants