Skip to content

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

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

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

Conversation

@timfish

Copy link
Copy Markdown
Collaborator

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.

Comment threadpackages/core/src/hub.ts Outdated
Comment threadpackages/core/src/hub.ts Outdated

@AbhiPrasadAbhiPrasad left a comment

Copy link
Copy Markdown
Contributor

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
CollaboratorAuthor

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

@AbhiPrasad

Copy link
Copy Markdown
Contributor

We fix this properly in v8!

@AbhiPrasadAbhiPrasad changed the title feat(core): Throw error when tracing extensions are missingfix(core): Log warning when tracing extensions are missingApr 11, 2023
@AbhiPrasad
AbhiPrasad merged commit a9621fc into getsentry:developApr 11, 2023
@timfish
timfish deleted the feat/missing-tracing-throw branch April 11, 2023 08:42
Sign up for freeto 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

@timfish@AbhiPrasad@mydea