Skip to content

fix: Add known extensions to telemetry #4280

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

adamspofford-dfinity
Copy link
Contributor

Records when dfx extension run is used with nns or sns, unless it is a help command.

@adamspofford-dfinity adamspofford-dfinity marked this pull request as ready for review June 18, 2025 23:57
@adamspofford-dfinity adamspofford-dfinity requested a review from a team as a code owner June 18, 2025 23:57
let sanitized_value = if *id == "@extension_name" {
match matches.try_get_one::<OsString>(id) {
Ok(Some(s)) if s == "sns" || s == "nns" => {
Some(s.to_str().unwrap().to_string())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we would not just log the extension being installed always?

Copy link
Contributor Author

@adamspofford-dfinity adamspofford-dfinity Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because users can define their own extensions, and we're trying to avoid inspecting user-defined strings (a pathological case, but so are extensions generally). If you want to capture Azle usage it can be manually added

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: record the extension name from the manifest during dfx extension install, here:

https://github.com/dfinity/sdk/blob/master/src/dfx-core/src/extension/manager/install.rs#L48

Copy link
Member

@ericswanson-dfinity ericswanson-dfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using extension run, the extension name is available from the extension manifest here. Can we try using that rather than hardcoding a couple of known extensions?

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.

3 participants