Conversation
…r wildcards in the object name.
8b4afcf to
ab3f0b2
Compare
powersj
reviewed
Nov 15, 2021
Contributor
powersj
left a comment
There was a problem hiding this comment.
two questions on docs, tested on windows 10 VM with a simple test case.
Huge thanks for this!
srebhan
reviewed
Nov 16, 2021
Member
srebhan
left a comment
There was a problem hiding this comment.
@reimda TBH I have no idea on localization on Windows, i.e. I cannot judge on the "algorithm". However, I tried to review from a code point of view and have two very minor suggestions. Otherwise your approach looks sensible, but as I said, I have no idea... :-)
Contributor
|
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
powersj
approved these changes
Nov 22, 2021
reimda
added a commit
that referenced
this pull request
Dec 1, 2021
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a setting to undo the localization that windows does when expanding wildcards.
Many users of this plugin want to gather English metrics from all windows machines, even those that have non-English UI. This is possible when not using wildcards, but before this PR it was not possible when using wildcards on non-English machines because windows localizes counters in the ExpandWildCardPath call.
There are three parts to a counter: object name, counter name, and instance. Object name and counter name are well defined but instance is machine dependent.
This PR is a workaround that lets you use wildcards in the instance name without localizing metrics. It ignores the localized names returned from ExapandWildCardPath and always uses the object and counter names in the plugin config. Users of this new setting still won't be able to use wildcards in instance or counter names.
I checked on a German localized windows installation and didn't find any instance names that were localized. There are numeric indexes, disk/filesystem non-localized identifiers like drive name/path/volume name (c:,HarddiskVolume5), process ID/names, etc. There are also special non-localized English magic strings like "_Total". These are all the same as English windows.