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

Sentry.addTracingExtensions() doesn't exist #8624

Closed
3 tasks done
jeengbe opened this issue Jul 25, 2023 · 3 comments · Fixed by #8820
Closed
3 tasks done

Sentry.addTracingExtensions() doesn't exist #8624

jeengbe opened this issue Jul 25, 2023 · 3 comments · Fixed by #8820
Assignees

Comments

@jeengbe
Copy link
Contributor

jeengbe commented Jul 25, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

7.60.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

n/a

Steps to Reproduce

Call Sentry.startTransaction() without Sentry.init() before.

Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});

=> Property 'addTracingExtensions' does not exist on type 'typeof import("/thing/node_modules/.pnpm/@[email protected]/node_modules/@sentry/node/types/index")'.


Expected Result

n/a

Actual Result

n/a

@lforst
Copy link
Member

lforst commented Jul 25, 2023

I think the log message is misleading here. I am not sure though if we should export addTracingExtensions in node.

@jeengbe The intended way to use the SDK is to call init() before any calls to startTransaction(). I recommend you do this for now.

@jeengbe
Copy link
Contributor Author

jeengbe commented Jul 25, 2023

Thanks! I figured so too since it works just fine with init().

Still tripped me up a couple of times 😄

@lforst
Copy link
Member

lforst commented Jul 25, 2023

@jeengbe yeah something here is not optimal for sure. Thanks for bringing this up.

  • We should explore whether it is even necessary to have addTracingExtensions() in non-browser packages.
  • We should think about the log message. I believe it is more likely that people missed an init call than a addTracingExtensions call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants