kubernetes-sigs / custom-metrics-apiserver

Framework for implementing custom metrics support for Kubernetes
Apache License 2.0
504 stars 176 forks source link

Add metric about metrics freshness #126

Closed olivierlemasle closed 1 year ago

olivierlemasle commented 1 year ago

Add a metric custom_metrics_apiserver_metric_freshness_seconds, similar to the metric metrics_server_api_metric_freshness_seconds from metrics-server.

This metric can optionally be registered using RegisterMetrics(registrationFunc func(metrics.Registerable) error) error, e.g:

metrics.RegisterMetrics(legacyregistry.Register)

Also, in test-adapter:

k8s-ci-robot commented 1 year ago

@olivierlemasle: This issue is currently awaiting triage.

If custom-metrics-apiserver contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
olivierlemasle commented 1 year ago

I've updated the PR to follow your suggestions.

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgrisonnet, olivierlemasle

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/OWNERS)~~ [dgrisonnet] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
olivierlemasle commented 1 year ago

... but the ones in the test-adapter provider need to be reflected in https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/docs/getting-started.md. That can be done in a follow-up but we need to make sure that we keep the doc up-to-date.

Yes, I'm thinking about it since #108. I've just opened an issue for that topic: #132.

zroubalik commented 1 year ago

@olivierlemasle @dgrisonnet would be nice to have all exposed metrics documented somewhere.

dgrisonnet commented 1 year ago

I opened an issue to keep track of that: https://github.com/kubernetes-sigs/custom-metrics-apiserver/issues/134