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

telemetry: add basic telemetry for tiup #1341

Merged
merged 4 commits into from
May 7, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Add basic telemetry collector to tiup, in a similar way as cluster does.

What is changed and how it works?

  • Add report structure for tiup
  • Use the same eventUUID for both tiup and cluster if cluster is called by tiup

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

Related changes

  • Need to cherry-pick to the release branch

Release notes:

telemetry: add basic telemetry for `tiup`

@AstroProfundis AstroProfundis added the component/tiup Issues about the TiUP package management component itself label Apr 30, 2021
@AstroProfundis AstroProfundis added this to the v1.4.3 milestone Apr 30, 2021
@AstroProfundis AstroProfundis requested a review from lucklove April 30, 2021 09:17
@AstroProfundis AstroProfundis self-assigned this Apr 30, 2021
@ti-chi-bot ti-chi-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #1341 (882654f) into master (4403b08) will increase coverage by 26.13%.
The diff coverage is 16.61%.

❗ Current head 882654f differs from pull request most recent head 2cf256c. Consider uploading reports for the commit 2cf256c to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1341       +/-   ##
===========================================
+ Coverage   15.80%   41.93%   +26.13%     
===========================================
  Files         146      290      +144     
  Lines       12134    21899     +9765     
===========================================
+ Hits         1918     9184     +7266     
- Misses       9721    11242     +1521     
- Partials      495     1473      +978     
Flag Coverage Δ
dm 24.87% <3.54%> (?)
integrate 33.26% <16.97%> (+17.45%) ⬆️
playground 14.20% <3.55%> (?)
tiup 16.01% <17.02%> (+0.20%) ⬆️
unittest 22.20% <3.27%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/completion.go 20.15% <0.00%> (-0.16%) ⬇️
cmd/telemetry.go 19.64% <0.00%> (-1.52%) ⬇️
components/cluster/command/deploy.go 30.23% <0.00%> (ø)
components/cluster/command/root.go 24.60% <0.00%> (ø)
components/cluster/command/telemetry.go 18.18% <0.00%> (ø)
pkg/cluster/operation/telemetry.go 0.00% <0.00%> (ø)
pkg/flags/debug.go 100.00% <ø> (ø)
pkg/telemetry/report.pb.go 1.01% <3.61%> (+0.03%) ⬆️
cmd/mirror.go 48.95% <50.00%> (+0.02%) ⬆️
pkg/telemetry/report.go 59.09% <50.00%> (ø)
... and 249 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4403b08...2cf256c. Read the comment docs.

cmd/root.go Outdated Show resolved Hide resolved
@lucklove
Copy link
Member

lucklove commented May 7, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lucklove

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 the status/LGT1 Indicates that a PR has LGTM 1. label May 7, 2021
@lucklove
Copy link
Member

lucklove commented May 7, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 70dfc4a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 7, 2021
@ti-chi-bot ti-chi-bot merged commit a254fbc into pingcap:master May 7, 2021
@AstroProfundis AstroProfundis deleted the tiup-telemetry branch May 7, 2021 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tiup Issues about the TiUP package management component itself size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants