stackdriver_exporter icon indicating copy to clipboard operation
stackdriver_exporter copied to clipboard

Enhancement proposal: Optionally filter projectIDs at scrape-time

Open xairos opened this issue 3 years ago • 0 comments

Thanks for the stackdriver_exporter project! This project has allowed us to consolidate metrics in Prometheus, further enabling us to build centralized Prom tooling (ex. for SLOs).

I'm proposing following change:

Current behaviour

Metrics can be filtered at call-time via the following scrape config:

params:
  collect:
  - compute.googleapis.com/instance/cpu
  - compute.googleapis.com/instance/disk

Proposed behaviour

Metrics could be filtered by both projectID and prefix at call-time:

params:
  project_ids:
  - my-test-project1
  - my-test-project2
  collect:
  - compute.googleapis.com/instance/cpu
  - compute.googleapis.com/instance/disk

How it could be helpful

For the platform team that I work on, this would enable hosting stackdriver_exporter as a service to tenants. The tenants have their own GCP projects, and they could filter for metrics from their own projects at scrape-time.

I'd be happy to contribute this enhancement if it makes sense.

xairos avatar Feb 23 '22 14:02 xairos