improve metric `handle_query_duration_seconds` and` tidb_server_query_total`
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
we use tidb in a multi-tenant environment, thus it would be helpful to be able to distinguish the caller in some of the monitor metrics, for example, adding a `user` tag in metrics like `handle_query_duration_seconds` and` tidb_server_query_total`, thus we could customize the alerts based on different users.
also, it would be useful that the `result` tag for `tidb_server_query_total` could be more specific. for example, now it has value `OK` and `Error`, it would be useful if the `Error` could be further broken down into server error (like http 5xx) or client error (like http 4xx), so that the alert could distinguish them.
Contributor guide
Assessment
This issue has not been assessed yet.