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

docs: automate metrics list documentation #9950

Merged
merged 3 commits into from
Jul 24, 2018
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Jul 21, 2018

Currently, need manual cluster set-up to find all available metrics, thus cannot be documented. Automatically document all available metrics, with embedded etcd for master branch or specified endpoints. This will make tracking metrics changes much easier.

Following PR should initialize grpc_server_msg_sent_total for all available RPCs (#8878). Right now, v3.1 and v3.2 only show the ones that have been requested.

# for latest master branch
etcd-dump-metrics > docs/metrics-latest

# download etcd v3.3 to ./bin
goreman start
etcd-dump-metrics -addr http://localhost:2379/metrics > docs/metrics-v3.3

# download etcd v3.2 to ./bin
goreman start
etcd-dump-metrics -addr http://localhost:2379/metrics > docs/metrics-v3.2

# download etcd v3.1 to ./bin
goreman start
etcd-dump-metrics -addr http://localhost:2379/metrics > docs/metrics-v3.1

Sample rendering (will be served via https://etcd.readthedocs.io/en/latest once merged)

screen shot 2018-07-22 at 12 39 51 am

For #9438.

@gyuho gyuho force-pushed the doc-metrics branch 3 times, most recently from 5145ae3 to 2c65b34 Compare July 21, 2018 18:35
@gyuho gyuho force-pushed the doc-metrics branch 3 times, most recently from b45a569 to dc25387 Compare July 21, 2018 22:05
@codecov-io
Copy link

Codecov Report

Merging #9950 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9950      +/-   ##
=========================================
- Coverage   69.12%   69.1%   -0.02%     
=========================================
  Files         386     386              
  Lines       35784   35784              
=========================================
- Hits        24735   24730       -5     
- Misses       9232    9244      +12     
+ Partials     1817    1810       -7
Impacted Files Coverage Δ
client/client.go 77.45% <0%> (-7.19%) ⬇️
clientv3/namespace/watch.go 72.72% <0%> (-6.07%) ⬇️
pkg/transport/listener.go 58.67% <0%> (-4.09%) ⬇️
proxy/grpcproxy/watcher.go 85.71% <0%> (-4.09%) ⬇️
clientv3/maintenance.go 69.38% <0%> (-2.05%) ⬇️
pkg/adt/interval_tree.go 89.18% <0%> (-1.51%) ⬇️
etcdserver/api/v2http/client.go 85.51% <0%> (-1.21%) ⬇️
etcdserver/api/v3rpc/watch.go 74.18% <0%> (-0.99%) ⬇️
clientv3/client.go 70.96% <0%> (-0.88%) ⬇️
mvcc/watchable_store.go 82.8% <0%> (-0.71%) ⬇️
... and 13 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 104b6a3...dc25387. Read the comment docs.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@wenjiaswe
Copy link
Contributor

lgtm. Thanks @gyuho , very useful tool. I will start to play with it.

I will back port it to 3.3. and 3.2. I will check if it's OK to back port to 3.1 or if there is any modification needed.

@gyuho gyuho merged commit dd44069 into etcd-io:master Jul 24, 2018
@gyuho gyuho deleted the doc-metrics branch July 24, 2018 17:23
@gyuho
Copy link
Contributor Author

gyuho commented Jul 24, 2018

@wenjiaswe I am ok with backporting it but since http://etcd.readthedocs.io/en/latest/ is only serving on master branch for now, old metrics won't be shown for awhile. It would be helpful if you can regenerate those metrics using etcd-dump-metrics after me and @jpbetz finished today's release process.

@wenjiaswe
Copy link
Contributor

OK, got it.

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.

None yet

3 participants