-
Notifications
You must be signed in to change notification settings - Fork 96
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
base: master
Are you sure you want to change the base?
Conversation
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()) |
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.
Any reason why we would not just log the extension being installed always?
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.
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
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.
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
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.
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?
Records when
dfx extension run
is used withnns
orsns
, unless it is a help command.