Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
cherry-pick tikv#9582 to release-4.0 You can switch your code base to this Pull Request by using [git-extras](https://github.com/tj/git-extras): ```bash # In tikv repo: git pr tikv#9591 ``` After apply modifications, you can push your change to this PR via: ```bash git push git@github.com:ti-srebot/tikv.git pr/9591:release-4.0-0fe01b8da4b8 ``` --- Signed-off-by: iosmanthus <myosmanthustree@gmail.com> ### What problem does this PR solve? This pull request adds server info metrics via a `GaugeVec` in format: `(version, githash) -> startup_ts`. Problem Summary: ### Related changes - Need to cherry-pick to the release branch ### Check List <!--REMOVE the items that are not applicable--> Tests <!-- At least one of them must be included. --> - Manual test (add detailed scripts or steps below) ```sh http get 'http://localhost:9090/api/datasources/proxy/1/api/v1/query_range?query=tikv_server_info&start=1611738330&end=1611738465&step=15' { "data": { "result": [ { "metric": { "__name__": "tikv_server_info", "hash": "None", "instance": "127.0.0.1:20180", "job": "tikv", "version": "5.0.0-rc.x" }, "values": [ [ 1611738360, "1611738218" ], [ 1611738375, "1611738218" ], [ 1611738390, "1611738218" ], [ 1611738405, "1611738218" ] ] } ], "resultType": "matrix" }, "status": "success" } ``` Side effects - Performance regression - Consumes more CPU - Consumes more MEM - Breaking backward compatibility ### Release note <!-- bugfixes or new feature need a release note --> - server: add server info metrics for DBasS
- Loading branch information