Skip to content

Guide to Custom Metrics Backend

akshat edited this page Oct 20, 2023 · 5 revisions

Goose natively supports StatsD Metrics Backend. Users might be using a different backend like Prometheus, metrics.clojure, etc. We've provided an option to integrate a custom metric backend.

As a start, refer to the implementation of StatsD.

Go through these steps to implement a Metric Backend plugin:

  • Implement all functions of Metrics Protocol
  • enabled? returns Truthy if metrics are enabled, Falsy otherwise
  • gauge, increment & timing functions correspond to standard data types of metrics
    • They take a key, value in the context of the data type & a map of tags
    • Publish metrics to your backend or store it in-memory for scraping by metrics server

Previous: Monitoring & Alerting        Next: Middlewares

Clone this wiki locally