Skip to content

Conversation

@thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Dec 13, 2025

Summary

This PR proceeds with the fixes stated in #21454

Test Plan
  1. Compiling this branch locally;
  2. Install it and check charts.
Additional Information
For users: How does this change affect me?

Summary by cubic

Fixes incorrect perflib mappings, labels, and priorities across the Windows plugin so charts show the right counters, units, and names. Improves accuracy and reliability of metrics for IIS, Exchange, .NET, Memory, NUMA, ADFS, Network, Storage, Objects, and Processes.

  • Bug Fixes
    • Corrected counter mappings and key names in ADFS, ASP.NET, Exchange, .NET Framework, Network, Memory, and IIS (e.g., OAuth Password Grant/Token Requests, executing requests, RPC active users, remoting remote calls, ICMP OutEchoReps, and “per sec” units).
    • Fixed chart IDs, labels, and priorities (Exchange WORKLOAD enums, IIS connection/logon attempts sources and naming, NUMA chart prefix, w3wp file-cache chart id).
    • Safety and misc fixes: proper buffer sizes in Storage, type casting for Objects metrics, removed unused init in Processes, and ensured NUMA charts update after reading counters.

Written for commit 2c37061. Summary will update automatically on new commits.

@thiagoftsm thiagoftsm requested a review from stelfrag December 13, 2025 03:11
@github-actions github-actions bot added area/collectors Everything related to data collection collectors/windows labels Dec 13, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 12 files

Prompt for AI agents (all 7 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/collectors/windows.plugin/perflib-web-service.c">

<violation number="1" location="src/collectors/windows.plugin/perflib-web-service.c:453">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; (double &#39;t&#39; introduced).</violation>

<violation number="2" location="src/collectors/windows.plugin/perflib-web-service.c:460">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; in the chart context.</violation>

<violation number="3" location="src/collectors/windows.plugin/perflib-web-service.c:461">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; in the chart title.</violation>

<violation number="4" location="src/collectors/windows.plugin/perflib-web-service.c:666">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; (double &#39;t&#39; introduced).</violation>

<violation number="5" location="src/collectors/windows.plugin/perflib-web-service.c:673">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; in the chart context.</violation>

<violation number="6" location="src/collectors/windows.plugin/perflib-web-service.c:674">
P2: Typo: &#39;attemptts&#39; should be &#39;attempts&#39; in the chart title.</violation>
</file>

<file name="src/collectors/windows.plugin/perflib-objects.c">

<violation number="1" location="src/collectors/windows.plugin/perflib-objects.c:48">
P0: Inverted condition: returns error (-1) on success and success (0) on failure. The condition should be negated since `do_objects` returns `true` on success and `false` on failure.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes various incorrect perflib mappings, labels, priorities, and typos across multiple Windows plugin collectors to improve the accuracy and reliability of metrics collection.

Key changes:

  • Corrected counter key mappings and variable names in ADFS, ASP.NET, Exchange, .NET Framework, Network, Memory, and IIS collectors
  • Fixed naming consistency issues (e.g., "attemp" → "attempt", "WORKlOAD" → "WORKLOAD")
  • Improved code quality by removing unused initialization code, fixing type casts, and correcting buffer sizes

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/collectors/windows.plugin/windows_plugin.h Fixed typo in enum name (ATTEMP → ATTEMPT) and corrected Exchange WORKLOAD priority enum names
src/collectors/windows.plugin/perflib-web-service.c Renamed variables and functions from "attemp/attemps" to "attempt/attempts", fixed counter source for connection attempts, corrected chart ID to use app_name instead of windows_shared_buffer
src/collectors/windows.plugin/perflib-storage.c Increased volumeName buffer size from 260 to 261 bytes and updated GetVolumeInformationA size parameter accordingly
src/collectors/windows.plugin/perflib-processes.c Removed unused empty initialize() function and its invocation
src/collectors/windows.plugin/perflib-objects.c Added explicit type casts for semaphore metrics and fixed return value checking for do_objects()
src/collectors/windows.plugin/perflib-numa.c Fixed chart ID prefix typo (numae → numa) and corrected counter reading logic to always update charts
src/collectors/windows.plugin/perflib-network.c Fixed OutEchoReps counter key for both ICMPv4 and ICMPv6 from "Received" to "Sent"
src/collectors/windows.plugin/perflib-netframework.c Fixed remoting counter reference, corrected variable names for CLR security checks (link_time → rt_checks, stack_walk_depth → run_time_checks), and fixed dimension ID for queue length
src/collectors/windows.plugin/perflib-memory.c Corrected counter key names from "/s" to "/sec" and removed extraneous line breaks in formatting
src/collectors/windows.plugin/perflib-exchange.c Fixed typo in variable name (Deliery → Delivery), function name (worload → workload), corrected counter usage for RPC active user count, and updated WORKLOAD priority enum names
src/collectors/windows.plugin/perflib-asp.c Fixed counter references for executing requests and transaction functions
src/collectors/windows.plugin/perflib-adfs.c Swapped OAuth password grant and token request counter key assignments, and adjusted priorities for password grant and token request functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection collectors/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant