pingcap / pingcap/tidb

Add more metrics to monitor the sessions from distinct components

Open
#60,509 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

We can add some options to `Pool`, for example:

```
s, err := pool.Get(WithByComp("TTL"))
```

And we can know the session is obtained by the component `TTL` and then the internal metrics counter with name "TTL" increased by 1.

When the session is closed or put back, the TTL counter decreased by 1.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.