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(core): Log warning when tracing extensions are missing #7601

Merged
merged 9 commits into from Apr 11, 2023

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Mar 23, 2023

Migrating away from @sentry/tracing, we lose the side-effects that are now added via addTracingExtensions().

When calling startTransaction() without tracing extensions, it returns undefined which doesn't match the types. This can result in errors elsewhere that do not help you fix the issue.

packages/core/src/hub.ts Outdated Show resolved Hide resolved
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Leaving for @mydea to confirm

@AbhiPrasad
Copy link
Member

Actually @timfish could we change this into a console.warn instead? I know this is more correct, but throwing an unhandled error like this could have bad side effects in a users workflow.

@timfish
Copy link
Collaborator Author

timfish commented Mar 29, 2023

Yeah I suppose people could already be relying on startTransaction returning undefined

@AbhiPrasad
Copy link
Member

We fix this properly in v8!

@AbhiPrasad AbhiPrasad changed the title feat(core): Throw error when tracing extensions are missing fix(core): Log warning when tracing extensions are missing Apr 11, 2023
@AbhiPrasad AbhiPrasad merged commit a9621fc into getsentry:develop Apr 11, 2023
58 checks passed
@timfish timfish deleted the feat/missing-tracing-throw branch April 11, 2023 08:42
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

3 participants