RobustPerception / azure_metrics_exporter

Azure metrics exporter for Prometheus
Apache License 2.0
133 stars 69 forks source link

Support Azure Monitor custom metric namespace #78

Closed louisfelix closed 4 years ago

louisfelix commented 4 years ago

Hi @brian-brazil !

Azure Monitor API have a metric namespace concept that is not supported in the exporter. In Azure Monitor API, metrics are returned for the default namespace, but a custom namespace can be used for custom metrics. One of the use case we need this feature for is to access the guest OS performance counters, but the goal here is to support custom metrics in general (a custom namespace must be passed to the API query in order to access those).

This PR adds the following:

Thanks!

louisfelix commented 4 years ago

Shouldn't this be automatically included in the output metric name?

Yes, the metric namespace could be added as a prefix of the metric name (like in the cloudwatch exporter) if it is specified. Is that what you mean?

brian-brazil commented 4 years ago

Is that what you mean?

Yes

louisfelix commented 4 years ago

Hi @brian-brazil , I fixed all review items.

brian-brazil commented 4 years ago

Thanks!