Observability · Flashcard

How does your own service come to expose a request counter?

  • AA client library — it maintains the metrics and serves /metrics
  • BAn exporter sidecar — it derives the counter from the logs
  • CA scrape config — the server counts the requests it observes
  • DA recording rule — it builds the counter from existing series

Why this is the answer

A client library gives your code the counter, gauge and histogram objects and exposes them on an HTTP endpoint for Prometheus to scrape, which is how first-party instrumentation works in every supported language. An exporter translates a system you cannot modify, a scrape config only says where to look, and a recording rule can only derive from metrics that already exist.

Official docs
Study in Gnoseed →