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

api: add /debug and /metrics #426

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #425

Problem Summary:
Currently, we are using /api/debug and /api/metrics, which are inconsistent with other components. Thus, TiDB Operator, TiUP, and Dashboard need to handle it specially.

What is changed and how it works:
Add /debug and /metrics.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
zhangmingdeMacBook-Pro:tiproxy zhangming$ curl http://127.1:3080/debug/pprof/goroutine > g
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5137    0  5137    0     0   584k      0 --:--:-- --:--:-- --:--:-- 2508k
zhangmingdeMacBook-Pro:tiproxy zhangming$ curl http://127.1:3080/metrics > m
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    44  100    44    0     0   6075      0 --:--:-- --:--:-- --:--:-- 44000
zhangmingdeMacBook-Pro:tiproxy zhangming$ curl http://127.1:3080/api/debug/pprof/goroutine > g
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4980    0  4980    0     0   563k      0 --:--:-- --:--:-- --:--:-- 2431k
zhangmingdeMacBook-Pro:tiproxy zhangming$ curl http://127.1:3080/api/metrics > m
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    48  100    48    0     0   7313      0 --:--:-- --:--:-- --:--:-- 48000

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot requested review from bb7133 and xhebox December 27, 2023 10:19
@ti-chi-bot ti-chi-bot bot added the size/S label Dec 27, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 27, 2023
Copy link

ti-chi-bot bot commented Dec 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xhebox

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

ti-chi-bot bot commented Dec 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-27 10:22:05.365541091 +0000 UTC m=+1647616.402768047: ☑️ agreed by xhebox.

@ti-chi-bot ti-chi-bot bot added the approved label Dec 27, 2023
@djshow832
Copy link
Collaborator Author

/retest

1 similar comment
@wuhuizuo
Copy link

/retest

@ti-chi-bot ti-chi-bot bot merged commit a35f4fd into pingcap:main Dec 27, 2023
4 of 5 checks passed
@djshow832 djshow832 deleted the status_api branch December 27, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /debug and /metrics API
3 participants