Stackdriver / stackdriver-prometheus

Prometheus support for Stackdriver
https://cloud.google.com/monitoring/kubernetes-engine/prometheus
Apache License 2.0
19 stars 12 forks source link

support metric_relabel for __name__ #9

Closed mtanda closed 6 years ago

mtanda commented 6 years ago

What was the expected result?

Prometheus drop metrics which match pattern.

    metric_relabel_configs:
    - source_labels: [__name__]
      regex: ^foo_.*$
      action: drop

What happened instead?

Prometheus can't drop the metrics.

mtanda commented 6 years ago

@jkohen Would you check this?

jkohen commented 6 years ago

I can reproduce, I will work on a fix. Thanks!

mtanda commented 6 years ago

@jkohen Thanks for quick reply and fix. I close this PR :-)

jkohen commented 6 years ago

The PR hasn't been merged, yet, please don't close the issue.

mtanda commented 6 years ago

Oops, sorry. This is a PR. I should make an Issue first... Anyway, I keep this PR until merging your PR.

jkohen commented 6 years ago

Indeed! I betrayed my lack of fluency in GitHub. Thanks for the PR 😄 mine has tests and fixes one issue with this one, so I'll keep that.

jkohen commented 6 years ago

Release 0.4.2 includes the fix.

mtanda commented 6 years ago

Thanks lot!!