Telemetry
sluice sends; the host decides where it goes. Nothing reads telemetry back: the queue never depends on it (ADR 0014).
What sluice sends
Section titled “What sluice sends”-
Off unless asked:
SLUICE_OTEL=1(ortrue,yes,on) in the environment of whatever runs sluice, or--otelon its command line. -
Where: OTLP over plain HTTP, protobuf, to
OTEL_EXPORTER_OTLP_ENDPOINT, by defaulthttp://localhost:4318(/v1/traces,/v1/metrics). No TLS: something on the host receives it and forwards it. -
As: service
sluice(SLUICE_OTEL_SERVICE_NAMEchanges it), withservice.versionthe release’s. The standardOTEL_RESOURCE_ATTRIBUTESadds the host’s own, e.g.host.name=build-7,deployment.environment=crew. -
Traces: one per round of a branch,
sluice.round, withsluice.recover,sluice.decideandsluice.performbeneath it, andsluice.form,sluice.start,sluice.verdict,sluice.blameandsluice.landbeneath those. Attributes:sluice.branch,sluice.submissions,sluice.candidate(the revision tested),sluice.executor,sluice.confined,sluice.outcome,sluice.ran,sluice.replayed. -
Metrics, each with
sluice.branch:Metric Kind What sluice.queue.depthgauge submissions not yet out of the queue sluice.windowgauge combinations the branch tests at once sluice.verdictscounter results read, by sluice.outcomesluice.tasks.ran,sluice.tasks.replayedcounter tasks run, and answered from the cache sluice.culpritscounter submissions blamed for a failure sluice.conflictscounter submissions removed for a conflict sluice.landed,sluice.refusedcounter submissions landed; landings refused because the branch moved sluice.submission.landed_afterhistogram, seconds submit to landed sluice.candidate.tested_forhistogram, seconds a combination’s time under test, by sluice.outcomesluice.cache.restoredcounter a checkout’s build cache restored, by sluice.hit(key,last,none) -
The checks inside a run: with telemetry on, a run gets sluice’s
OTEL_*variables, and moon runs with--otel, so moon’s own traces and metrics arrive as servicemoon. moon does not nest them under sluice’s: each carriessluice.trace_id,sluice.span_id,sluice.placeandsluice.revisionas resource attributes, so a search for the round’s trace id finds them.
What a host needs
Section titled “What a host needs”- A receiver on
localhost:4318, OTLP/HTTP. It must listen on localhost: sluice’s sandboxed runs reach localhost and nothing else. SLUICE_OTEL=1where sluice runs: the shell or role environment of every session that runswt submitorsluice submit, and the service or timer that runssluice runorsluice step, if any.OTEL_RESOURCE_ATTRIBUTESnaming the host (host.name=…,deployment.environment=…), so hosts sending to one backend can be told apart.- No secrets in sluice’s environment. A run’s checks see sluice’s
OTEL_*,OTEL_EXPORTER_OTLP_HEADERSincluded. An API key belongs to the receiver’s own configuration.
When nothing is listening, sluice loses its telemetry and carries on: a
refused connection costs nothing. A receiver that accepts and never
answers delays each sluice step’s exit by up to the exporter’s timeout
(OTEL_EXPORTER_OTLP_TIMEOUT, 10 seconds by default).
Receivers
Section titled “Receivers”A viewer on a developer’s machine, keeping nothing once it is closed; one of these at a time, since both take port 4318:
nix run nixpkgs#otel-tui # in a terminalnix run nixpkgs#otel-desktop-viewer # in a browserAny OpenTelemetry collector, or an agent with an OTLP receiver on localhost, forwards to a backend over TLS itself. The repository’s docs/telemetry.md has the receiver configurations.