Rocky_Mountain_Vending/.pnpm-store/v10/files/25/4e3d84db53826459c25dcf071be637998ba54a98c42d2791dcd27a63a3284c7b2a94b00242e509294d5e3a28dcf2cf10cbbfd5a88cb6e70ca7f85587c7042a
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

48 lines
1.7 KiB
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const semanticAttributes = require('../semanticAttributes.js');
const debugLogger = require('../utils/debug-logger.js');
const spanUtils = require('../utils/spanUtils.js');
/**
* Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span
* as the 4th parameter.
*/
function setMeasurement(name, value, unit, activeSpan = spanUtils.getActiveSpan()) {
const rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan);
if (rootSpan) {
debugBuild.DEBUG_BUILD && debugLogger.debug.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);
rootSpan.addEvent(name, {
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,
});
}
}
/**
* Convert timed events to measurements.
*/
function timedEventsToMeasurements(events) {
if (!events || events.length === 0) {
return undefined;
}
const measurements = {};
events.forEach(event => {
const attributes = event.attributes || {};
const unit = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;
const value = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;
if (typeof unit === 'string' && typeof value === 'number') {
measurements[event.name] = { value, unit };
}
});
return measurements;
}
exports.setMeasurement = setMeasurement;
exports.timedEventsToMeasurements = timedEventsToMeasurements;
//# sourceMappingURL=measurement.js.map