Skip to content

metrics-exporter-prometheus: bucket matcher values should be transformed to match metric names #173

@tobz

Description

@tobz

Currently, a user that specifies a bucket override -- to treat a histogram as a proper Prometheus histogram vs the default of emitting it as a Prometheus summary -- will use a "matcher" to indicate what metrics to match.

The matcher itself is applied against the transformed metric name. Prometheus only supports certain characters in the metric name, so for example, namespaced.metric.here gets turned into namespaced_metric_here. However, we don't transform the matcher value in the same way, so it's not clear whether or not you need to specify namespaced.metric.here or namespaced_metric_here to do the matching.

We should simply transform the matcher value in the same way we transform the metric names. This would allow either variation of the name to be specified in the matcher, and should be totally backwards-compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-exporterComponent: exporters such as Prometheus, TCP, etc.E-simpleEffort: simple.T-enhancementType: enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions