Set of Pivro utiliy functions
Environment Check (envCheck)
Used to check whether environment variables are defined during startup.
Throws an error if any of the specified environment variables are not defined.
Usage
envCheck([
'REDIS_HOST',
'MONGO_HOST',
'MONGO_USER',
'MONGO_PASS'
]);
Convert OpenTelemetry trace and span IDs to Datadog format
Converts OpenTelemetry representations of trace and span IDs (128bit unsigned int in hexadecimal representation) to Datadog (64bit unsigned int).
Usage
const {convertedTraceId, convertedSpanId} = otelToDatadog(traceId, spanId);