Skip to content

Enhancement proposal: Optionally filter projectIDs at scrape-time #145

@xairos

Description

@xairos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions