@servita/utilities
v1.0.4
Published
A set of useful utilities
Downloads
16
Readme
Set of Servita 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([
'PEP_SANDBOX_API_KEY_PKB',
'ADMIN_API_KEY',
'RECORDS_HOST',
'ODS_HOST',
'PKB_STATIC_MOCK_HOST',
'GNCR_STATIC_MOCK_HOST',
'ERS_STATIC_MOCK_HOST',
]);
#### 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);