discourse / prometheus_exporter

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

ActiveRecord collector does not expose hostname by default #271

Closed sosedoff closed 1 year ago

sosedoff commented 1 year ago

AR Instrumentation exposes the hostname in https://github.com/discourse/prometheus_exporter/blob/main/lib/prometheus_exporter/instrumentation/active_record.rb#L57 but its not picked up in the collector: https://github.com/discourse/prometheus_exporter/blob/main/lib/prometheus_exporter/server/active_record_collector.rb#L28-L39

Is this behavior intentional?

SamSaffron commented 1 year ago

Interesting, no I do not think this is intentional.

sosedoff commented 1 year ago

I've discovered this issue while working on #268 refactor. I'll send a PR with a fix.