Skip to content

Comments

Fix GetRegisteredOrEnabledProviders() documentation claiming list is small#2348

Merged
brianrob merged 3 commits intomainfrom
copilot/fix-provider-count-discrepancy
Jan 13, 2026
Merged

Fix GetRegisteredOrEnabledProviders() documentation claiming list is small#2348
brianrob merged 3 commits intomainfrom
copilot/fix-provider-count-discrepancy

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

The documentation for GetRegisteredOrEnabledProviders() incorrectly stated it returns "a relatively small list (less than 1000), unlike GetPublishedProviders." In practice, this method returns ~2500+ providers, significantly more than GetPublishedProviders() which returns ~1100.

Changes

  • Updated documentation to reflect actual behavior: "often 2000+ entries, potentially larger than GetPublishedProviders"
/// <summary>
/// Returns the GUID of all event provider that either has registered itself in a running process (that is
/// it CAN be enabled) or that a session has enabled (even if no instances of the provider exist in any process).
/// <para>
/// This list can be quite large (often 2000+ entries), potentially larger than GetPublishedProviders.
/// </para>
/// </summary>
public static unsafe List<Guid> GetRegisteredOrEnabledProviders()
Original prompt

This section details on the original issue you should resolve

<issue_title>Large number of providers from GetRegisteredOrEnabledProviders() goes against documentation</issue_title>
<issue_description>I have used these methods to get a list of providers on my machine:

  • logman query providers : 1108 providers
  • TraceEventProviders.GetPublishedProviders() : 1104 providers
  • TraceEventProviders.GetRegisteredOrEnabledProviders() : ~2540 providers (fluctuates consistently around this number)

The documentation for GetRegisteredOrEnabledProviders() states:

This is a relatively small list (less than 1000), unlike GetPublishedProviders.

I am not getting a "small list". What is causing this inconsistency?

It's also worth noting that calling TraceEventProviders.GetProviderName() on each of these >2000 provider GUIDs only yields ~790 names that can be mapped.</issue_description>

<agent_instructions>Please fix the comments here. Don't make any changes to code.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ehavior

Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix count discrepancy in GetRegisteredOrEnabledProviders method Fix GetRegisteredOrEnabledProviders() documentation claiming list is small Jan 12, 2026
Copilot AI requested a review from brianrob January 12, 2026 20:05
Copy link
Member

@brianrob brianrob left a comment

Choose a reason for hiding this comment

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

@copilot please address the comment.

/// <para>
/// This is a relatively small list (less than 1000), unlike GetPublishedProviders.
/// This list can be quite large (often 2000+ entries), potentially larger than GetPublishedProviders.
/// Note that not all providers returned will have names available via GetProviderName().
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// Note that not all providers returned will have names available via GetProviderName().

Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot please address the comment.

Removed the GetProviderName note from the documentation in commit e7cb514.

Copilot AI requested a review from brianrob January 12, 2026 20:13
@brianrob brianrob marked this pull request as ready for review January 12, 2026 22:38
Copy link
Collaborator

@marklio marklio left a comment

Choose a reason for hiding this comment

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

LGTM. Should there be an enumeration API that allows enumeration without a "big" heap allocation?

@brianrob
Copy link
Member

LGTM. Should there be an enumeration API that allows enumeration without a "big" heap allocation?

Yeah, likely. This is one of those things where I think I'd like to go through the API surface and see what new APIs we might add. The API surface was designed before many of the modern techniques and so you'll find these littered all throughout.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Large number of providers from GetRegisteredOrEnabledProviders() goes against documentation

3 participants