-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[pkg/stanza/operator/input/windows] [receiver/windowseventlogreceiver] Add include providers #38517
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
Conversation
…vidersSet This is done in preparation for includeProviders Signed-off-by: Szilard Parrag <[email protected]>
Signed-off-by: Szilard Parrag <[email protected]>
d5e03dd
to
41d37aa
Compare
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.
Why is this necessary? Isn't a provider included unless it is excluded explicitly? Are you able to write a test which fails without this change?
Hey @djaglowski I believe it's necessary as I do not think there's a way to express this: Application channel logs only from a specific provider (providerFoo). Writing it using |
Thanks for clarifying. Given your explanation I think this makes sense but I think documentation needs to be super clear about how include and exclude work together. |
Sure thing @djaglowski, that's a valid concern! Should I also add a validation that checks whether a given provider is present both in the include/exclude list? I think that should result in a hard error. This is what I currently have in my mind regarding docs: windowseventlog/include_and_exclude:
channel: "application"
include_providers: ["foo"]
exclude_providers: ["bar"] The previous example snippet will only forward events if the event's provider is |
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.
Thanks for the PR @OverOrion! It makes sense to have the include_providers
, however, we should try to leverage the Win32 API to implement it since one of the possible reasons to use such feature is to reduce the amount of work done by the receiver.
Description
Adds the ability to filter for specific providers, the opposite of
exclude_providers
.Usage
I tested it manually using the following: