Skip to content

auth_failures_total is a metric the runtime does not emit, and observability.mdx alerts on it #87

Description

@os-zhuang

Found while working #70, which deleted the other phantom-metric alert in the same code block (kernel_cache_misses_total). Filed rather than folded in: unlike that one, the correct shape here is not pinned by any evidence, so it needs a call rather than a transcription.

What is there

content/docs/operate/observability.mdx, in "Useful starter alerts":

 - alert: ObjectOSAuthFailureSpikeexpr: rate(auth_failures_total[5m]) > 5for: 10mannotations:
summary: "Sustained auth failure rate — check for misconfiguration or attack"

auth_failures_total is emitted by nothing. On objectstack@origin/main:

  • git grep auth_failures_total over the whole repository returns zero files.
  • packages/observability/src/semconv.ts is the canonical registry — it exists, in its own words, "so hosts can wire alerts/dashboards against a stable namespace and so call sites don't sprinkle string literals through the code base". It declares exactly 13 names, and no auth metric is among them:
http_requests_total http_request_duration_ms http_request_errors_total
storage_operations_total storage_operation_duration_ms storage_errors_total
cache_lookups_total cache_writes_total cache_errors_total
job_schedule_failures_total registry_lookups_total registry_lookup_duration_ms
registry_source_fetches_total

The first alert in the same block, ObjectOS5xxSpike, uses http_requests_total and is fine — which is what makes this one costly. A reader copies the whole block, one alert works, and the other silently never fires. A Prometheus rule on a metric that is never scraped does not error; rate() over an absent series yields no samples and the alert simply stays green forever. That is worse than no alert, because the operator believes auth failures are covered.

Why this is a call, not a transcription

Two defensible fixes, and picking between them is a product decision:

  • Delete the alert. Consistent with what Six pages outside Deploy still describe the retired multi-Environment runtime #70 did to the kernel alert, and honest. Costs the page its only security-facing alert, and "auth failure rate" is also listed as a signal to track in the table above it and in resources/faq.mdx ("What metrics should I monitor?").
  • Ask the runtime to emit one. Auth failure rate is a genuinely useful signal, SEMCONV is the declared place for it, and the framework already instruments HTTP, storage, cache, jobs and the registry. That is an objectstack card, not an objectos one — this repository would then transcribe the name once it exists.

There is a cheap third option worth considering while deciding: express the alert against a metric that does exist, by counting 401/403 responses out of http_requests_total{status=~"40[13]"}. That covers most of what the original alert was watching without waiting for a new metric. Whether it covers enough is the part that needs a real answer — a failed password on a session endpoint and a rejected API key do not necessarily land on the same status code.

⛔ Do not resolve this by leaving the alert and adding a note that the metric may not exist. An alert that cannot fire, annotated as such, is still an alert a reader copies.

Verified against: packages/observability/src/semconv.ts and a repository-wide git grep auth_failures_total on objectstack@origin/main.

Related: #70.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions