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

feat: send telemetry data to backend #4152

Merged
merged 8 commits into from
Mar 20, 2025

Conversation

ericswanson-dfinity
Copy link
Member

@ericswanson-dfinity ericswanson-dfinity commented Mar 15, 2025

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:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@ericswanson-dfinity ericswanson-dfinity marked this pull request as ready for review March 17, 2025 20:48
@ericswanson-dfinity ericswanson-dfinity requested a review from a team as a code owner March 17, 2025 20:48
use clap::Parser;
use url::Url;

const DEFAULT_URL: &str = "https://sdk.telemetry.dfinity.network";
Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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";
Copy link
Contributor

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?

@ericswanson-dfinity ericswanson-dfinity enabled auto-merge (squash) March 20, 2025 17:59
@ericswanson-dfinity ericswanson-dfinity merged commit 12db977 into master Mar 20, 2025
298 checks passed
@ericswanson-dfinity ericswanson-dfinity deleted the ens/sdk-1980-transmit-command branch March 20, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants