Open kzu opened 4 years ago
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Notify danmosemsft if you want to be subscribed.
@tommcdon @noahfalk I assume you'll triage this as the owners.
@kzu thank you for the suggestion. I'm marking this as milestone 5.0 for now, though depending on other competing priorities and remaining time left in the 5.0, we may defer this issue to the next milestone. If you are interested in contributing a pull request, please feel free to do so. cc @josalem
Cool, thanks! Yes, the plan is to contribute the fix, if you'd be willing to take it in once approved 👍
Seems like a very reasonable proposal to me : ) If you want to submit a PR including a working test case I'd be glad to review it. If all looks good we'll merge it.
Description
When libraries and apps use
DiagnosticSource
(which is really nice!), there is an automatic bridge to also automatically get ETW events "for free", pretty much. This is immensely useful!There is one big drawback, however: the only supported listener filter is an exact match for a listener name (or no filter at all). This is less than ideal, since an app that uses
DiagnosticSource
extensively and has extensions contributing to it too, can no longer selectively collect traces for areas of the app and not others. This is specially problematic when using PerfView since you'd get machine-wide logs from anything that's usingDiagnosticSource
, basically.Proposal:
Extend the supported format for event name so that it can also include a
*
character at the end of theDIAGNOSTIC_SOURCE_NAME
part. This would indicate that the filter should do aStartsWith
match instead of an==
comparison with the listener name.