-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: send telemetry data to backend #4152
Conversation
Report week ("YYYY-WW") Trigger send if filesize exceeds threshold
use clap::Parser; | ||
use url::Url; | ||
|
||
const DEFAULT_URL: &str = "https://sdk.telemetry.dfinity.network"; |
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.
maybe this should come from ToolConfig, which would allow tests to override it.
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 that would be helpful, but since we're not automatically testing this for now maybe you can just leave a hint in a comment?
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 would, but because that would dismiss your CR approval, I'll let these comments serve for now.
use clap::Parser; | ||
use url::Url; | ||
|
||
const DEFAULT_URL: &str = "https://sdk.telemetry.dfinity.network"; |
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 that would be helpful, but since we're not automatically testing this for now maybe you can just leave a hint in a comment?
Description
This draft PR contains two commits.
The first adds
dfx _send-telemetry
, not meant to be called except by dfx itself, that sends collected telemetry data to a backend.The second adds a mechanism for deciding when to automatically call the above, with file locking to ensure correct operation even if many commands are executed at once.
Fixes https://dfinity.atlassian.net/browse/SDK-1980
How Has This Been Tested?
Tested locally using https://github.com/rikonor/clickhouse-playground/tree/ens/dfx-events as the backend.
Checklist: