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 changes #17304
Telemetry changes #17304
Conversation
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.
LGTM, but would like @daxian-dbw
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
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.
LGTM
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
@@ -947,6 +1074,7 @@ private void ParseHelper(string[] args) | |||
} | |||
else if (MatchSwitch(switchKey, "mta", "mta")) | |||
{ | |||
ParametersUsed |= ParameterBitmap.MTA; |
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.
Same here, this line should be moved to _staMode = false;
to keep consistent with the rest.
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
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.
LGTM with switch statement suggestion.
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Outdated
Show resolved
Hide resolved
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.
LGTM
Also add telemetry for the parameters provided to pwsh.
But keep support for it in the telemetry client.
Tidy up alignment.
Update comments to improve understanding.
This is not needed and can result in us not sending the telemetry that includes the parameter data.
…d file. This handles the case where we have a read-only file system and want to continue to capture telemetry.
Address some code review issues: - Changed the logic of how a uuid file is created, now if we can't create the file, we'll use a default identifier. - Make the assignment of the parameter bitmap more consistent. - update some comments to elaborate a bit more.
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
🎉 Handy links: |
PR Summary
PR Context
Our telemetry ingestion is currently very high with between 75-80% being taken up by ApplicationType metrics. The data doesn't seem to be showing a lot of variation over time, and isn't providing the value it did initially for its cost. We also have questions which are difficult to answer with the current telemetry (primarily disambiguating automation from interactive sessions). This PR includes metrics of how parameters of pwsh.exe are used. To reduce the payload size, the parameters are created as a bitmap which can then be investigated via kusto queries. In addition to collecting the used parameters, we are now capturing the value of ExecutionPolicy to help us understand the distribution of how this is being used. Lastly, this PR will also collect the version number of the loaded module where we can report it. With this we can make determinations as to how new modules are picked up, and how long older modules remain in use.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).