agentleFS
ostrium-labsostrium-labs/loams-skills/skills/observability-metering/SKILL.md

observability-metering

Skill1 starsChanged 39 days agoApache-2.0View on GitHub

Instrument a Loams-backed stack: structured logs, metrics, traces, OTLP, dashboards, SLOs, alerts, usage metering, and cost per run. Use when a service goes to production or when cost and reliability need a baseline.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No secrets or PII in telemetry.

    line 59
  2. Distinctive:

    No unbounded cardinality (no user id, request id, or raw query as a metric label).

    line 60
  3. Distinctive:

    Do not page on a metric nobody can act on.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Observability and metering

You cannot operate or price what you cannot see.

When to use

  • A pilot or production service is being instrumented.
  • A cost, latency, or error-budget question needs an answer.
  • A tenant or agent needs usage accounting.

Inputs

  • company/architecture/target.md.
  • The service's SLOs and the company's existing observability stack.
  • Design 63: Meter, Design 01.

Procedure

  1. Logs. Structured JSON with request id, tenant, principal, operation, duration, outcome. Never log documents, tokens, embeddings, or PII.
  2. Metrics. RED (rate, errors, duration) per endpoint; USE (utilization, saturation, errors) per store; Loams client metrics (calls, retries, idempotency replays, consistency-token waits).
  3. Traces. OTLP spans across the service, the Loams client, and the engine where available. Propagate request id and tenant.
  4. Dashboards. One per service and one per store. Show p50/p95/p99, error rate, saturation, queue lag, search recall proxies, and cost.
  5. SLOs and alerts. Define the SLO, the error budget, and pages that are actionable. Alert on burn rate, not on every blip.
  6. Metering. Record usage per tenant, agent, and operation in Loams Meter or the company's billing pipeline. Define the unit (request, GB, vector query, agent run) and the price basis.
  7. Cost per run. Attribute compute, storage, egress, and model tokens. Set a budget and an alert per tenant or product.
  8. Retention. Logs, traces, and audit have different retention; record them and delete on schedule.

Outputs

  • company/observability/dashboards.md and exported dashboard JSON if the company uses one.
  • company/observability/slos.md.
  • company/observability/metering.md with units and cost model.
  • Alerts wired to the on-call rotation.

Guardrails

  • No secrets or PII in telemetry.
  • No unbounded cardinality (no user id, request id, or raw query as a metric label).
  • Metering must be idempotent; a retry must not bill twice.
  • Do not page on a metric nobody can act on.

References

  • Design 63
  • Design 01
  • Cutover and operations

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.