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

Misleading "Tracing extension 'startTransaction' has not been added." message #8361

Closed
3 tasks done
jeengbe opened this issue Jun 19, 2023 · 9 comments
Closed
3 tasks done
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug

Comments

@jeengbe
Copy link
Contributor

jeengbe commented Jun 19, 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.55.2

Issue

Calling Sentry.startTransaction() without calling Sentry.init() first yields the following note:

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

Most often, Sentry.init was not called, and the above message is slightly misleading 🙂

@lforst
Copy link
Member

lforst commented Jun 19, 2023

Hi, can you share your Sentry.init() code. Thanks!

@lforst lforst added the Package: node Issues related to the Sentry Node SDK label Jun 19, 2023
@jeengbe
Copy link
Contributor Author

jeengbe commented Jun 19, 2023

Apologies, I really thought that was irrelevant here 🙂

import * as Sentry from '@sentry/node';

Sentry.init({
  // dsn & stuff
  defaultIntegrations: false,
  tracesSampleRate: 1,
  integrations: [
    new Sentry.Integrations.FunctionToString(),
    new Sentry.Integrations.ContextLines(),
    new Sentry.Integrations.LinkedErrors(),
  ],
});

@lforst
Copy link
Member

lforst commented Jun 19, 2023

Can you doublecheck that you're calling Sentry.init() before you're calling startTransaction?

@jeengbe
Copy link
Contributor Author

jeengbe commented Jun 19, 2023

Just checked again, we do

@jeengbe
Copy link
Contributor Author

jeengbe commented Jun 19, 2023

Or, actually, I was missing an environment variable.

Sentry.init() was never called after all.

@jeengbe
Copy link
Contributor Author

jeengbe commented Jun 19, 2023

I am sorry, let's repurpose this issue 🙂

@jeengbe jeengbe changed the title Tracing extension 'startTransaction' has not been added. Misleading "Tracing extension 'startTransaction' has not been added." message Jun 19, 2023
@github-actions
Copy link
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@sdudley
Copy link

sdudley commented Jul 13, 2023

I am seeing this misleading error message too, and yes, it resulted from the failure to call Sentry.init().

@jeengbe jeengbe closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
@jeengbe
Copy link
Contributor Author

jeengbe commented Jul 25, 2023

Tracking in #8624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug
Projects
Archived in project
Development

No branches or pull requests

4 participants