pingcap / diag

A tool to collect diagnostic data from TiDB Clusters
https://docs.pingcap.com/tidb/stable/clinic-introduction
Apache License 2.0
24 stars 9 forks source link

add collectk subcommand and support collect logs for k8s cluster #447

Closed nexustar closed 1 year ago

nexustar commented 1 year ago

What problem does this PR solve?

What is changed and how it works?

Check List

Tests

Code changes

Side effects

Related changes

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 34.38% and project coverage change: +0.13% :tada:

Comparison is base (7a82994) 30.05% compared to head (5f4dfdd) 30.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #447 +/- ## ========================================== + Coverage 30.05% 30.18% +0.13% ========================================== Files 50 52 +2 Lines 4229 4357 +128 ========================================== + Hits 1271 1315 +44 - Misses 2788 2871 +83 - Partials 170 171 +1 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `30.18% <34.38%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [cmd/diag/command/collect.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y21kL2RpYWcvY29tbWFuZC9jb2xsZWN0Lmdv) | `33.93% <0.00%> (-0.31%)` | :arrow_down: | | [cmd/diag/command/collectdm.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y21kL2RpYWcvY29tbWFuZC9jb2xsZWN0ZG0uZ28=) | `30.48% <0.00%> (-0.29%)` | :arrow_down: | | [cmd/diag/command/util\_metricdump.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y21kL2RpYWcvY29tbWFuZC91dGlsX21ldHJpY2R1bXAuZ28=) | `36.79% <0.00%> (-0.35%)` | :arrow_down: | | [pkg/utils/portforward.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL3V0aWxzL3BvcnRmb3J3YXJkLmdv) | `0.00% <0.00%> (ø)` | | | [cmd/diag/command/collectk.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y21kL2RpYWcvY29tbWFuZC9jb2xsZWN0ay5nbw==) | `46.24% <46.24%> (ø)` | | | [cmd/diag/command/root.go](https://app.codecov.io/gh/pingcap/diag/pull/447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y21kL2RpYWcvY29tbWFuZC9yb290Lmdv) | `20.09% <100.00%> (+0.38%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.