Skip to content

fix(core): Log warning when tracing extensions are missing#7601

Merged
AbhiPrasad merged 9 commits intogetsentry:developfrom
timfish:feat/missing-tracing-throw
Apr 11, 2023
Merged

fix(core): Log warning when tracing extensions are missing#7601
AbhiPrasad merged 9 commits intogetsentry:developfrom
timfish:feat/missing-tracing-throw

Conversation

@timfish
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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
Copy Markdown
Collaborator Author

timfish commented Mar 29, 2023

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

@AbhiPrasad
Copy link
Copy Markdown
Contributor

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
@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.

3 participants