Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prometheus gauge metrics for server feature gate #19324

Open
siyuanfoundation opened this issue Feb 3, 2025 · 3 comments · May be fixed by #19452
Open

Add Prometheus gauge metrics for server feature gate #19324

siyuanfoundation opened this issue Feb 3, 2025 · 3 comments · May be fixed by #19452
Assignees

Comments

@siyuanfoundation
Copy link
Contributor

siyuanfoundation commented Feb 3, 2025

What would you like to be added?

As described in the feature gate KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-etcd/4578-server-feature-gate/README.md#ways-to-query-feature-gate-state

We would like to add Prometheus gauge metrics for server feature gate, with the format of
etcd_feature_enabled{name="featureName",stage="Alpha"} 1 if the feature is enabled.

Why is this needed?

To query which features are on.

What needs to be done?

Register new metrics in server/etcdserver/metrics.go
Set the metric values when starting new server in server/etcdserver/server.go, next to

serverID.With(prometheus.Labels{"server_id": b.cluster.nodeID.String()}).Set(1)

@siyuanfoundation
Copy link
Contributor Author

/assign @gangli113

/cc @henrybear327

@k8s-ci-robot
Copy link

@siyuanfoundation: GitHub didn't allow me to assign the following users: gangli113.

Note that only etcd-io members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @gangli113

/cc @henrybear327

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gangli113
Copy link
Contributor

/assign @gangli113

@gangli113 gangli113 linked a pull request Feb 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants