feat(otel): first-class OpenTelemetry export — traces, otelite CI gate, o11y VRS tree - #347
Conversation
|
@codex Please review — PR 1 of the otel stack: OTLP/HTTP-JSON trace export behind Fleet e2e already proven: real traces queryable in Grafana via gcx (trace Also includes a CI timeout bump 30m→90m ( Posted on behalf of @schickling
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93c5bf09c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…e, o11y VRS tree - src/telemetry.rs: OTLP/HTTP JSON exporter behind OTEL_EXPORTER_OTLP_ENDPOINT, hard no-op when unset; service.name per process unit (st2-supervisor/st2-cli), service.version from the build stamp, host.name from detect_host. - run.rs: st2.reconcile_pass root span per supervisor pass and up_once with st2.host/st2.crash_loops/st2.unparked attributes. - service.rs: captured ambient OTEL_* vars serialize into systemd Environment= lines (injectable, unit-tested). - tests/otel_export.rs + checks.otel-export: end-to-end proof exporting real st2 spans into an otelite receiver (effect-utils flake package); gate is non-vacuous (no skip escape in CI). - docs/vrs/06-observability/: requirements, spec, decisions, experiment evidence for the all-signals PR stack (metrics and log bridge follow). opentelemetry-otlp pinned to http-json + reqwest-blocking-client: enabling both reqwest client features compiles but fails at runtime with NoHttpClient. agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
…om interview Q5: RED-minimal metric set, bounded-enum labels only. Q6: tracing facade for logs (tracing-opentelemetry + appender). R04 attrs and unit env mechanism closed by evidence. agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
nix flake check now also builds the st2-otel-export gate; the 30m budget was cancelled mid-build on contended shared runners. agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
…nner deadline in e2e - Add process-wide ENABLED gate + PassSpan guard in telemetry; all three reconcile-pass sites (up_once, supervisor loop, newly instrumented up_once_selected) now construct nothing when OTEL_EXPORTER_OTLP_ENDPOINT is unset instead of allocating a no-op tracer/attrs per pass. - tests/otel_export.rs: read otelite stdout on a reader thread feeding an mpsc channel so the 10s banner deadline is enforced with recv_timeout instead of a blocking read that can hang the CI workflow. agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@929dc21
agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@e4789b0
agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@e4789b0
b1d2b63 to
539427b
Compare
What
First-class OpenTelemetry support for st2 — PR 1 of the agreed all-signals stack.
src/telemetry.rs— OTLP/HTTP JSON exporter behindOTEL_EXPORTER_OTLP_ENDPOINT, hard no-op when unset;service.name=st2-{supervisor,cli},service.versionfrom the build stamp,host.name.src/run.rs—st2.reconcile_passroot span per supervisor pass andup_once, attrsst2.host,st2.crash_loops,st2.unparked.src/service.rs— captured ambientOTEL_*env serialized into systemd-user unitEnvironment=lines (injectable + unit-tested).tests/otel_export.rs+ newchecks.otel-exportflake gate — end-to-end proof: realst2 up --onceexports spans into an otelite receiver (effect-utils flake package); gate is non-vacuous in CI.docs/vrs/06-observability/— requirements/spec/decisions/experiment evidence for the o11y subsystem (axe vrs check --profile strict: 0 findings).Notes for reviewers
opentelemetry-otlp = { default-features = false, features = ["http-json", "reqwest-blocking-client", "internal-logs"] }. Enabling both reqwest client features compiles but fails at runtime withNoHttpClient; the blocking client is required because st2 has no tokio reactor.effect-utils(github:overengineeringstudio/effect-utils/main) brings the otelite package output; nofollows, mirroring howptystays self-contained.Verification
nix build .#checks.x86_64-linux.otel-exportpasses (~110s) in the sandbox: real binary → real OTLP export → otelite assertions.agent_publish/eval_up/doctorfailures that reproduce identically on cleanHEAD(pre-existing, environment-dependent).axe vrs check --profile strict .: 0 findings underdocs/vrs/06-observability/**.Follow-ups (tracked in docs/vrs/06-observability)
st2 up <spec>path not yet instrumented; remaining provenance resource attrs deferred.Posted on behalf of @schickling
agent_identityagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile