Quickstart
import { getTelemetry } from '@quik/telemetry';
const telemetry = getTelemetry();
await telemetry.withSpan('jobs.run', async () => {
// do work
});
Notes
- Register
@quik/telemetryin bootstrap and settelemetry.enabled(envTELEMETRY_ENABLED) to actually export spans; otherwisegetTelemetry()resolves to a no-op implementation that still runs the callback but records nothing. getTelemetry()is re-exported from@quik/telemetry(originally defined in@quik/core) and never returnsundefined— it is always safe to call.- Set
telemetry.serviceName/telemetry.exporter.otlp.endpointto name spans and send them to an OTLP collector.