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 metric for server feature gate #19452

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

gangli113
Copy link
Contributor

@gangli113 gangli113 commented Feb 20, 2025

Fix #19324

Add a prometheus metric etcd_server_feature_enabled

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@k8s-ci-robot
Copy link

Hi @gangli113. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 gangli113 force-pushed the featuregate branch 2 times, most recently from 7abf517 to 70b4119 Compare February 21, 2025 19:08
@gangli113
Copy link
Contributor Author

gangli113 commented Feb 21, 2025

/cc @ahrtr

@gangli113
Copy link
Contributor Author

sorry @ahrtr, assign to you by mistake. I was trying to add you to reviewer list.

@gangli113
Copy link
Contributor Author

/cc @ahrtr

@ivanvc ivanvc mentioned this pull request Feb 26, 2025
4 tasks
@ahrtr ahrtr changed the title add prometheus metric Add prometheus metric for server feature gate Feb 26, 2025
@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

Overall looks good with just a minor comment. Thanks @gangli113 for the effort.

Signed-off-by: Gang Li <ganglica@google.com>
Signed-off-by: Gang Li <gangligit@gmail.com>
@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

This is what I got. Should we remove AllAlpha and AllBeta? cc @fuweid @siyuanfoundation @ivanvc

F5WPP69Q7H:Downloads wachao$ curl http://127.0.0.1:2379/metrics | grep etcd_server_feature_enabled
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0# HELP etcd_server_feature_enabled Whether or not a feature is enabled. 1 is enabled, 0 is not.
# TYPE etcd_server_feature_enabled gauge
etcd_server_feature_enabled{name="AllAlpha",stage="ALPHA"} 0
etcd_server_feature_enabled{name="AllBeta",stage="BETA"} 0
etcd_server_feature_enabled{name="CompactHashCheck",stage="ALPHA"} 0
etcd_server_feature_enabled{name="DistributedTracing",stage="ALPHA"} 0
etcd_server_feature_enabled{name="InitialCorruptCheck",stage="ALPHA"} 0
etcd_server_feature_enabled{name="LeaseCheckpoint",stage="ALPHA"} 0
etcd_server_feature_enabled{name="LeaseCheckpointPersist",stage="ALPHA"} 0
etcd_server_feature_enabled{name="SetMemberLocalAddr",stage="ALPHA"} 0
etcd_server_feature_enabled{name="StopGRPCServiceOnDefrag",stage="ALPHA"} 0
etcd_server_feature_enabled{name="TxnModeWriteWithSharedBuffer",stage="BETA"} 1
100  155k    0  155k    0     0  49.5M      0 --:--:-- --:--:-- --:--:-- 75.9M

@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

This is what I got. Should we remove AllAlpha and AllBeta? cc @fuweid @siyuanfoundation @ivanvc

To be clearer, I meant to remove AllAlpha and AllBeta from the metrics.

@fuweid
Copy link
Member

fuweid commented Feb 26, 2025

To be clearer, I meant to remove AllAlpha and AllBeta from the metrics.

I think we should keep it because the user could set AllBeta=true to enable all the beta features.

@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

I think we should keep it because the user could set AllBeta=true to enable all the beta features.

Valid point.

@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

/ok-to-test

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, gangli113, siyuanfoundation

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 49fbd1e into etcd-io:main Feb 26, 2025
44 checks passed
@ahrtr
Copy link
Member

ahrtr commented Feb 26, 2025

/cherry-pick release-3.6

@k8s-infra-cherrypick-robot

@ahrtr: new pull request created: #19495

In response to this:

/cherry-pick release-3.6

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add Prometheus gauge metrics for server feature gate
7 participants