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

etcdserver: add leaseExpired metrics #8064

Merged
merged 1 commit into from
Jun 8, 2017

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Jun 8, 2017

Fix #8050.

e.g.

curl -L http://localhost:2379/metrics | grep lease

etcd_debugging_server_lease_expired_total 3

@heyitsanthony
Copy link
Contributor

s/revoked/expired? revokes could be issued by a client but expiration is always server-side

leaseRevoked = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "lease_revoked_total",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lease expiration? users can revoke lease explicitly too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably make this a debugging metrics initially? /cc @heyitsanthony

@gyuho gyuho force-pushed the lease-expiration-metrics branch 2 times, most recently from 78af5e4 to e631947 Compare June 8, 2017 17:18
@gyuho gyuho changed the title etcdserver: add leaseRevoked metrics etcdserver: add leaseExpired metrics Jun 8, 2017
Fix etcd-io#8050.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@gyuho gyuho force-pushed the lease-expiration-metrics branch 2 times, most recently from f33d0c7 to c0e032c Compare June 8, 2017 17:37
@@ -18,7 +18,7 @@ Metrics that are etcd2 related are documented [v2 metrics guide][v2-http-metrics

These metrics describe the status of the etcd server. In order to detect outages or problems for troubleshooting, the server metrics of every production etcd cluster should be closely monitored.

All these metrics are prefixed with `etcd_server_`
All these metrics are prefixed with `etcd_server_`, except `lease_expired_total` with `etcd_debugging_server_`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not really document debugging metrics in this doc. probably we should have a separate section for debugging metrics if we wish?

@gyuho gyuho force-pushed the lease-expiration-metrics branch from c0e032c to 45fd827 Compare June 8, 2017 17:45
@gyuho
Copy link
Contributor Author

gyuho commented Jun 8, 2017

@heyitsanthony @xiang90

PTAL.

Also want to include this in 3.2, since it won't break anything.
Any objection?

@gyuho
Copy link
Contributor Author

gyuho commented Jun 8, 2017

And I will add separate docs for debugging metrics later.

@xiang90
Copy link
Contributor

xiang90 commented Jun 8, 2017

lgtm

Copy link
Contributor

@heyitsanthony heyitsanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks

@gyuho gyuho added this to the v3.2.0 milestone Jun 8, 2017
@gyuho gyuho merged commit 9ffdb3a into etcd-io:master Jun 8, 2017
@gyuho gyuho deleted the lease-expiration-metrics branch June 8, 2017 18:13
@codecov-io
Copy link

codecov-io commented Jun 8, 2017

Codecov Report

Merging #8064 into master will increase coverage by 0.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8064      +/-   ##
==========================================
+ Coverage   76.33%   76.56%   +0.23%     
==========================================
  Files         341      341              
  Lines       26502    26511       +9     
==========================================
+ Hits        20229    20299      +70     
+ Misses       4810     4760      -50     
+ Partials     1463     1452      -11
Impacted Files Coverage Δ
mvcc/watchable_store.go 86.82% <ø> (+0.77%) ⬆️
etcdserver/server.go 80.97% <100%> (+0.6%) ⬆️
clientv3/lease.go 92.33% <100%> (+0.76%) ⬆️
etcdserver/metrics.go 69.23% <100%> (+1.23%) ⬆️
clientv3/watch.go 95% <100%> (-1%) ⬇️
etcdserver/api/v2http/client.go 85.14% <100%> (+0.2%) ⬆️
rafthttp/peer.go 90.22% <0%> (-3.01%) ⬇️
rafthttp/stream.go 88.25% <0%> (-0.68%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d335821...45fd827. Read the comment docs.

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

Successfully merging this pull request may close these issues.

None yet

4 participants