-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 telemetry initial implementation #18180
Conversation
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
/label component/executor component/server needs-cherry-pick-4.0 priority/release-blocker |
These labels are not found component/executor component/server needs-cherry-pick-4. |
Signed-off-by: Breezewish <me@breeswish.org>
err := telemetry.ReportUsageData(ctx, do.GetEtcdClient()) | ||
if err != nil { | ||
// Only status update errors will be printed out | ||
logutil.BgLogger().Warn("handleTelemetryLoop status update failed", zap.Error(err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can ignore the error to prevent a bunch of error messages in the offline environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors will be recorded in status. Only status update failures (which happens when TiDB cannot connect PD) will be printed out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to put the telemetry
package into util
instead of make it a top-level package.
Signed-off-by: Breezewish <me@breeswish.org>
/label component/executor, component/server, needs-cherry-pick-4.0, priority/release-blocker |
These labels are not found needs-cherry-pick-4. |
/run-all-tests |
@breeswish merge failed. |
/unlabel can-merge |
@ti-srebot /merge |
@breeswish No command or invalid command |
@SunRunAway
|
/merge |
/run-all-test |
/merge |
Sorry @SunRunAway, you don't have permission to trigger auto merge event on this branch. You are not a committer for the related sigs:ddl(slack),execution(slack). |
/run-unit-test |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #18197 |
/merge |
Your auto merge job has been accepted, waiting for:
|
I think we should check the performance in the Kubernetes for this request. @breeswish @SunRunAway |
* cherry pick #18180 to release-4.0 Signed-off-by: ti-srebot <ti-srebot@pingcap.com> * Fix merge conflicts Signed-off-by: Breezewish <me@breeswish.org> * Fix different names Signed-off-by: Breezewish <me@breeswish.org> * Trigger Co-authored-by: Wenxuan <hi@breeswish.org> Co-authored-by: Breezewish <me@breeswish.org>
What problem does this PR solve?
This PR implements the telemetry service.
What is changed and how it works?
What's Changed:
A telemetry service running in background is introduced. It will report usage data every 24 hours to PingCAP.
TODO: Verify privileges for newly addedVerified that ADMIN statements requires SUPER privilege.ADMIN
statements.Data Storing Compliance
The usage data is stored in AWS US region for non-China IPs, and stored in CN region for China IPs.
Data It Collects
Only device name and mount point in our allowed list (whitelist) will be collected in plain text. Otherwise they will be a SHA1 checksum.
More usage data may be collected in future versions.
Reset the Tracking UUID
The tracking UUID can be re-generated manually by:
Disable Telemetry On-The-Fly
Disable Telemetry Before Bootstrap
You can disable telemetry by setting config for all TiDB instances:
When telemetry is disabled in config, global variables will not taking effect (i.e. telemetry will be always disabled even if it is enabled in the global variable).
View Telemetry Status
Sample output:
You can see the status of the last telemetry attempt, as well as preview the usage data that will be send to PingCAP next time.
Sample Telemetry Data
CentOS 7
MacOS
Related changes
pingcap/docs
/pingcap/docs-cn
: TBDCheck List
Tests
Release note