sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

generateTraceId is being called when tracing is disabled

Open punkpeye opened this issue 1 month ago • 2 comments

Is there an existing issue for this?

  • [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • [x] I have reviewed the documentation https://docs.sentry.io/
  • [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

10.27.0

Framework Version

No response

Link to Sentry event

N/A

Reproduction Example/SDK Setup

N/A

Steps to Reproduce

Run Sentry with tracing disabled.

Expected Result

Would not expect calls to generateTraceId

Actual Result

Caught this while trying to identify performance issues.

Image

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

punkpeye avatar Nov 29 '25 00:11 punkpeye

JS-1230

linear[bot] avatar Nov 29 '25 00:11 linear[bot]

This is expected as errors events need to be attached to a trace context, even if span recording is turned off. This is called "tracing without performance" and more information can be found here.

This is useful if other services need the trace id for continuing tracing like the client SDKs. Generating IDs should be a very light operation unless you are seeing it affecting the performance, is that what you are seeing here?

logaretm avatar Dec 01 '25 09:12 logaretm