Skip to content

EventCounter events not filtered by EventSource/EventListener relationship #31927

@SteveHarveyUK

Description

@SteveHarveyUK

When using the System.Diagnostics.Tracing EventSource, EventListener and EventCounter classes, it would appear that the fired EventCounter events are not being filtered through the EventSource to the EventListener.

All of the custom EventListener instances I create seem to receive all EventCounter events regardless of which EventSource I use to EnableEvents on.

Not entirely sure if this is as designed, or if I'm doing something wrong, but I was expecting that EventListeners would only get events through the EventSource they were enabled against.

I have a repo that contains an example project that reproduces this issue (Thanks to Expecho and his blog):
https://github.com/SteveHarveyUK/Blog.git

Be interested to see if this is a bug or by design.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions