Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- 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
8.43.0
Framework Version
nodejs
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
import * as _crypto from 'node:crypto';
import * as Sentry from '@sentry/node';
// Simulates the traceId obtained from the outside world
function getRandomSentryTraceData() {
const sentryTrace = _crypto.randomBytes(16).toString('hex') + '-' + _crypto.randomBytes(8).toString('hex');
console.log('traceId', sentryTrace);
return { sentryTrace, baggage: 'environment=dev' };
}
const main = () =>
Sentry.continueTrace(getRandomSentryTraceData(), async () => {
await Sentry.startSpan({ name: 'hello span' }, (span) => {
console.log('span traceId', span.spanContext().traceId);
})
})
main()
Expected Result
Log same traceId
same as v8.42.0
Actual Result
different traceId
Metadata
Metadata
Assignees
Type
Projects
Status
No status