discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
525 stars 153 forks source link

Update example custom collector to inherit from BaseCollector #235

Closed geoffharcourt closed 2 years ago

geoffharcourt commented 2 years ago

The documentation advises that a custom collector should inherit from PrometheusExporter::Server::BaseCollector and the example in the docs does so. The code example inherits from Collector instead. We found this seemed to work in development but would behave unreliably in production. This change updates the example to match the code snippet in the Readme.

SamSaffron commented 2 years ago

Looks good, thanks for that!