Closed adamk9k closed 1 year ago
@adamk9k you can apply your custom labels to pretty much all collectors with:
PrometheusExporter::Client.default = PrometheusExporter::Client.new(
custom_labels: {
hostname: PrometheusExporter.hostname,
env: Rails.env
}
)
Apologies if this something documented, I couldn't figure it out. I'm trying to run the gem in a multi-container environment, with every container running its own exporter process. In the exporter initializer I have
this results in metrics like
where hostname appears as a label, but also:
where the host label is missing. Am I missing something in the configuration or do I need to add my custom collectors with explicit labels.
Thanks in advance