Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0004-headless-cli FR-015
The OpenTelemetry adapter of Headless (commons headless 0004-headless-cli FR-015 ): a run of a command is a headless.run span, each phase an event of it, each problem a log record in it, and the status and counts of the run are the span's attributes; a run that did not end with 0 ends its span as an error. It is an optional entry of its own: the command-line surface does not import the telemetry, it gives a port (RunObserver of Io) and this is what sits behind it, as the telemetry does for proc.setProcessTracer of the system.
import { headlessSignals, observerOf } from "@intellectual-frontiers/headless/otel" ;
import { createTelemetry } from "@intellectual-frontiers/telemetry/signals" ;
// const observer = observerOf(createTelemetry({ registry: headlessSignals, ...the resource, clock, random and processors }));
// await launch(program, { observer }); Source: commons/headless/src/otel/mod.ts
2 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
const headlessSignals: Registry<{ readonly "headless.run": { readonly signal: "span"; readonly role: "step"; readonly de… (899 characters) const headlessSignals : Registry <{ readonly "headless.run" : { readonly signal : "span" ; readonly role : "step" ; readonly description : "A run of a command of a headless program." ; readonly attributes : { readonly "headless.program" : "string" ; readonly "headless.version" : "string" ; readonly "headless.command" : "string" ; readonly "headless.exit.code?" : "int" ; readonly "headless.exit.name?" : "string" ; readonly "headless.problems.fail?" : "int" ; readonly "headless.problems.warn?" : "int" ; readonly "headless.problems.pending?" : "int" ; readonly "headless.problems.action?" : "int" ; }; }; readonly "headless.problem" : { readonly signal : "log" ; readonly role : "warning" ; readonly severity : 13 ; readonly description : "A problem a run found." ; readonly attributes : { readonly "headless.problem.level" : "string" ; readonly "headless.problem.code?" : "string" ; readonly "headless.problem.phase?" : "string" ; }; }; }>The signals a run of a command makes.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results
HeadlessTelemetrytype no test imports it type HeadlessTelemetry = Telemetry <typeof headlessSignals.kinds>;The telemetry the adapter needs: one whose registry is headlessSignals.
function observerOf (telemetry : HeadlessTelemetry ): RunObserver The observer of runs that reports them through a telemetry.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results