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

metrics: add storeID to metrics back #1506

Merged
merged 2 commits into from Apr 23, 2019
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 16, 2019

What problem does this PR solve?

#1429 uses the address to replace storeID in metrics, but since pd-ctl uses storeID to execute the store related command, it's not convenient for us to trace the problem. Another problem is when a store becomes tombstone, and add it back with the same address, the reset metrics function will reset this address. So it is better to add storeID back.

What is changed and how it works?

This PR adds storeID to metrics back.

Check List

Tests

  • Unit test

Related changes

  • Need to update the tidb-ansible repository

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx added the component/metrics Metrics. label Apr 16, 2019
@codecov-io
Copy link

Codecov Report

Merging #1506 into master will increase coverage by 0.05%.
The diff coverage is 85.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1506      +/-   ##
==========================================
+ Coverage   67.51%   67.56%   +0.05%     
==========================================
  Files         158      158              
  Lines       15550    15578      +28     
==========================================
+ Hits        10499    10526      +27     
+ Misses       4092     4090       -2     
- Partials      959      962       +3
Impacted Files Coverage Δ
server/metrics.go 100% <ø> (ø) ⬆️
server/schedule/metrics.go 100% <ø> (ø) ⬆️
server/schedulers/metrics.go 100% <ø> (ø) ⬆️
server/schedule/filters.go 76.57% <100%> (+0.27%) ⬆️
server/store_statistics.go 85.08% <100%> (+0.13%) ⬆️
server/heartbeat_streams.go 75% <55.55%> (-0.52%) ⬇️
server/coordinator.go 84.58% <68.42%> (+0.24%) ⬆️
server/grpc_service.go 57.52% <75%> (-0.35%) ⬇️
server/schedulers/balance_region.go 82.45% <85.71%> (+1.14%) ⬆️
server/schedulers/balance_leader.go 96.22% <94.11%> (+0.43%) ⬆️
... and 9 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 fc997de...ac510a9. Read the comment docs.

@siddontang
Copy link
Contributor

so now we have both store address and ID in the metrics, right?

@rleungx
Copy link
Member Author

rleungx commented Apr 16, 2019

@siddontang Right, it is more convenient for us to trace the problem.

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

Successfully merging this pull request may close these issues.

None yet

5 participants