project-codeflare / multi-cluster-app-dispatcher

Holistic job manager on Kubernetes
Apache License 2.0
108 stars 63 forks source link

Expose a metric of AppWrappers counts per state #674

Open ronensc opened 1 year ago

ronensc commented 1 year ago

Name of Feature or Improvement

A metric of AppWrappers count per state

Description of Problem the Feature Should Solve

How many AppWrappers are in each state (Pending, Runing, Failed, etc.)

Describe the Solution You Would Like to See

Expose a custom Prometheus gauge metric with the real-time values.

Describe Alternatives You Have Considered

Alternatively, this data can be retrieved by querying k8s apiserver for the AppWrapper CRD. This approach is taken in https://github.com/project-codeflare/mcad-dashboard. One advantage of using a Prometheus metric over querying the apiserver is that Prometheus metrics are being collected and stored which allows tracking how the counts change over time.

Additional Context

I'm about to submit a PR to implement this.

FYI @mamy-CS