package.build.cjs.utils-hoist.propagationContext.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Base implementation for all Sentry JavaScript SDKs
The newest version!
Object.defineProperty(exports, '__esModule', { value: true });
const misc = require('./misc.js');
/**
* Returns a new minimal propagation context.
*
* @deprecated Use `generateTraceId` and `generateSpanId` instead.
*/
function generatePropagationContext() {
return {
traceId: generateTraceId(),
spanId: generateSpanId(),
};
}
/**
* Generate a random, valid trace ID.
*/
function generateTraceId() {
return misc.uuid4();
}
/**
* Generate a random, valid span ID.
*/
function generateSpanId() {
return misc.uuid4().substring(16);
}
exports.generatePropagationContext = generatePropagationContext;
exports.generateSpanId = generateSpanId;
exports.generateTraceId = generateTraceId;
//# sourceMappingURL=propagationContext.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy