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

server: add server info metrics for DBasS (#9582) #9591

Merged
merged 3 commits into from
Jan 28, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Jan 28, 2021

cherry-pick #9582 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In tikv repo:
git pr https://github.com/tikv/tikv/pull/9591

After apply modifications, you can push your change to this PR via:

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

Tests

  • Manual test (add detailed scripts or steps below)
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

  • server: add server info metrics for DBasS

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added component/server Component: Server sig/diagnosis SIG: Diagnosis size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick Type: PR - Cherry pick labels Jan 28, 2021
@ti-srebot ti-srebot added this to the v4.0.11 milestone Jan 28, 2021
@ti-srebot
Copy link
Contributor Author

@iosmanthus please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/tikv/invitations

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 28, 2021
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 28, 2021
@breezewish
Copy link
Member

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 28, 2021
@zhongzc
Copy link
Contributor

zhongzc commented Jan 28, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • breeswish
  • zhongzc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 28, 2021
@zhongzc
Copy link
Contributor

zhongzc commented Jan 28, 2021

/merge

@ti-chi-bot
Copy link
Member

@zhongzc: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 36c5c24

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 28, 2021
@NingLin-P
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

@NingLin-P: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@NingLin-P: /merge is only allowed for the committers in list.

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@ti-srebot: Your PR has out-of-dated, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit e4fbabf into tikv:release-4.0 Jan 28, 2021
gengliqi pushed a commit to gengliqi/tikv that referenced this pull request Feb 20, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server Component: Server sig/diagnosis SIG: Diagnosis size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick Type: PR - Cherry pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants