-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add check when retrieving the worker process id using performance counters #23647
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Pinging @elastic/integrations (Team:Platforms) |
/test |
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, just added one question
@@ -263,7 +263,7 @@ func getw3wpProceses() (map[int]string, error) { | |||
func getProcessIds(counterValues map[string][]pdh.CounterValue) []WorkerProcess { | |||
var workers []WorkerProcess | |||
for key, values := range counterValues { | |||
if strings.Contains(key, "\\ID Process") { | |||
if strings.Contains(key, "\\ID Process") && values[0].Measurement != nil { |
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.
Just curious, do we need to check values
length first? like len(values) > 0
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.
a counter value is added by default in pdh_query_windows.go, if it does not contain the Measurement it will contain more info on the error. This is also picked up later.
…nters (elastic#23647) * fix for test * add check * changelog (cherry picked from commit 3220d46)
…nters (elastic#23647) * fix for test * add check * changelog (cherry picked from commit 3220d46)
…pack-when-oss-changes * upstream/master: [DOCS] Add setup content to Kubernetes and Cloud Foundry docs (elastic#23580) [CI] Mandatory windows support for all the versions (elastic#23615) Add check when retrieving the worker process id using performance counters (elastic#23647) Remove 4912 evtx from testing (elastic#23669) Add missing SSL settings (elastic#23632) Update X-Pack Packetbeat config (elastic#23666) Use hostname check from verify.go to handle patterns in TLS certs (elastic#23661) Fix: Dissect Cisco ASA 302013 message usernames (elastic#21196) Add FAQ entry for MADV settings in older versions (elastic#23429) Sync fixes from Integration Package Testing (elastic#23424) [Filebeat] Add Cisco ASA message '302023' parsing (elastic#23092) [Elastic Log Driver] Change hosts config flag (elastic#23628) Audit and Authentication Policy Change Events (elastic#20684)
What does this PR do?
Adds check when retrieving the worker process id using performance counters
Why is it important?
Exception
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues