-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/windowsperfcounters] Instance wildcard doesn't capture _Total instance #29054
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Spelunking the code I suspect that the root cause is that the |
ContextI'm not very familiar with this component, so I'm just going to leave some context for future reference. The scraper for this receiver creates a Possible SolutionAll of the methods that @pjanotti has referenced are available to be used here, but the current setup does not work with what would be required. The following calls could be made here in the
(Apologies if there are any obvious mistakes in the code above). When using the regex and expanding paths, the method needs to be able to return counters for each possible path. Existing functionality is only setup to return a single counter, even if the regex would match multiple. I think this could be done by adding a new method to QuestionCan anyone confirm if this has ever worked, if the |
Pinging code owners for pkg/winperfcounters: @dashpole @Mrod1598 @BinaryFissionGames. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
[EDIT 01: @crobert-1 @alxbl - I was using a counter for which
I looked at the current code and as it is it can't capture the
This makes sense because, as pointed out by @alxbl here, by including the aggregated instance there is the possibility of double counting for any aggregation happening after the receiver. Unfortunately, the name It seems that it is better to leave the current behavior as it is and just document the special treatment that |
Component(s)
receiver/windowsperfcounters
What happened?
Description
When the instance is set to "*" the user wants to capture all instances of a counter like
\Processor(*)\%Process Time
. However, the wildcard doesn't capture the_Total
instance.Steps to Reproduce
Run the collector using a config like this one:
Expected Result
That the
_Total
instance is also captured when the wildcard is used.Actual Result
The
_Total
instance is not captured.If the user tries to workaround by forcing the capture by explicitly adding
_Total
to the instances, i.e.:It still doesn't work because internally if the instances contain "" they are treated as if only "" was specified.
The way to workaround the issue is to create two receivers: one to capture
_Total
and one to capture the other instances, the later one using the wildcard.Collector version
22d86de
Environment information
Environment
OS: Windows 10, Windows Server 2022
Compiler(if manually compiled): go1.21.1 windows/amd64
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: