Skip to content

SLOs.md SLI 1: LogQL stop-gap unwraps latency_seconds field that verdict records do not emit #295

Description

@trilamsr

Summary

docs/SLOs.md SLI 1 (Verdict-emit latency) defines an "Example LogQL
(today, until #261 lands)" stop-gap that calls
unwrap latency_seconds on the verdict log stream. The verdict
log record does not carry a latency_seconds attribute:

$ grep "VerdictAttr" module/processor/patterndetectorprocessor/patterndetector.go
VerdictAttrPatternID      = "pattern.id"
VerdictAttrConfidence     = "pattern.confidence"
VerdictAttrHeadline       = "pattern.headline"
VerdictAttrRemediation    = "pattern.remediation"
VerdictAttrVerdictJSON    = "pattern.verdict_json"
VerdictAttrK8sPodName     = "k8s.pod.name"
… (no latency field)

Impact

Operators using the SLI 1 stop-gap in v0.4 (before the histogram lands)
get an empty LogQL result. SLI 1 has no functioning measurement until
the issue-261 follow-up lands (verdict_emit_seconds histogram —
which isn't actually #261's scope either, see issue cross-ref
below).

Two options

  1. Add a latency_seconds attribute to verdict log records. Set it
    to verdict.Timestamp - triggering.Timestamp. Then the LogQL
    stop-gap works as documented.
  2. Drop the stop-gap from SLOs.md. Acknowledge SLI 1 is unmeasurable
    in v0.4; pin to v0.5 when the histogram lands.

Option 1 ships in a 10-line PR on module/processor/patterndetectorprocessor/.
Option 2 is a doc edit only.

Cross-reference

Issue #261's scope is verdicts_emitted_total counter +
verdict_evidence_count histogram + consume_logs_duration_seconds
histogram — not verdict_emit_seconds. The latency histogram
SLOs.md cites has no tracking issue. File a separate v0.3 follow-up
issue for the latency histogram OR fold it into #261's acceptance.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions