-
Notifications
You must be signed in to change notification settings - Fork 728
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
client: add region request metrics which record caller info #9117
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: okJiang <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9117 +/- ##
==========================================
- Coverage 76.36% 76.25% -0.12%
==========================================
Files 473 473
Lines 71663 71699 +36
==========================================
- Hits 54728 54672 -56
- Misses 13514 13591 +77
- Partials 3421 3436 +15
Flags with carried forward coverage won't be shown. Click here to find out more. |
Subsystem: "server", | ||
Name: "region_request_cnt", | ||
Help: "Counter of region request.", | ||
}, []string{"request", "caller_id", "caller_component", "err_msg"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it more simple, e.g., request-component-module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScanRegions-tidb-server->tidb-tikv-driver
is kind of confusing and not readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request-component-module LGTM
However, there are caller_id
and caller_component in the current code. If we use request-component-module
here, it will cause confusion with the term component
.
ScanRegions-tidb-server->tidb-tikv-driver is kind of confusing and not readable.
It is indeed easy to get confused, and I am still thinking of a better format. Since we chose to use a hyphen as a connector in the component, continuing to use a hyphen in Grafana might look a bit strange.

Maybe we should name the component using camel case? Such as RegionCache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think? cc @lhy1024 @JmPotato @bufferflies
Signed-off-by: okJiang <[email protected]>
// client-go component | ||
CodecPDClient Component = "codec-pd-client" | ||
RegionCache Component = "region-cache" | ||
StoreCache Component = "store-cache" | ||
Oracles Component = "oracle" | ||
Rawkv Component = "rawkv" | ||
KvStore Component = "kv-store" | ||
InterceptedPDClient Component = "intercepted-pd-client" | ||
|
||
// TiDB component | ||
Pitr Component = "pitr" | ||
Ddl Component = "ddl" | ||
ImportInto Component = "import-into" | ||
TikvHandler Component = "tikv-handler" | ||
GcWorker Component = "gc-worker" | ||
GcJob Component = "gc-job" | ||
DistributedGcJob Component = "distributed-gc-job" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names can be reviewed with these two PR https://github.com/pingcap/tidb/pull/59911/files and tikv/client-go#1516
What problem does this PR solve?
Issue Number: Ref #8593
What is changed and how does it work?
Check List
Tests
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note