-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[receiver/windowseventlog] Add Windows Event Log Receiver #9228
Conversation
This is still pending a sponsor. |
df4ee46
to
d0fe705
Compare
d0fe705
to
fccc4fa
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.
Since this receiver can only run on windows, please add a dummy implementation for non-windows systems, to ensure users get a clear error message.
@@ -0,0 +1,3 @@ | |||
2020-08-25 INFO Something routine |
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.
Is this file used?
Realize lots more files changed with this previous commit, will fix that momentarily |
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.
Code looks good, but I've recently learned that windows unit tests are not currently running by default. For now, can you add a dedicated step to the build-and-test-windows.yml
, like https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9334/files#diff-5ca69371a0b431061a0b1b145a164ac5797c6a8bd745fba6061e3afe213318fd?
Will be holding off on closing this PR due to the following reasons. During integration tests, we noticed that certain fields of the Windows Event Log was not being populated by the receiver. Upon further inspection we notice that in our implemented code, to scrape some of the fields: The underlying log-collection code that collects windows event logs should really collect from any service not just logs generated by the We will be submitting an issue against the opentelemtry-log-collection repo detailing a proposed fix and work on the implementation. This PR will be blocked by the above changes to the log-collection code. |
e2fa721
to
e2a33f4
Compare
5bf91ff
to
f1f26e3
Compare
738744d
to
58db7cc
Compare
58db7cc
to
bff6453
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.
Let's simplify the file organization. We should follow the typical naming convention for files differentiated by OS, which is to append _windows.go
, _others.go
, and correspondingly _windows_test.go
and others_test.go
.
I see that you've deduplicated some code by having windowslog.go
for all OS's, but it's easier to understand the overall layout of the operator if these two sets of files are cleanly separated.
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.
Aside from the file naming/organization changes and a couple nits, this looks good.
added functionality for windows-log-event
457c133
to
d3ed683
Compare
@armstrmi, looks good except a check is failing:
|
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.
LGTM. Thanks @armstrmi!
…etry#9228) * initial commit added functionality for windows-log-event * fixed go.sum files * updated README * added windows event log to receivers_test * go mod tidy and added build flags * updated package name * dummy implementation created * updated versions.yaml and codeowners * updated logs received time * updated changelog with windoweventlogreceiver * cleaned up dependencies * initial commit added functionality for windows-log-event * fixed go.sum files * updated README * added windows event log to receivers_test * go mod tidy and added build flags * updated package name * updated xml_test to expect an array of interfaces * updated wait time for receiving event logs * fix winperfcounters * updated go.mod to point to latest otel-log-collection * removed otel log collection dependency * go mod tidy * added changes to go.sum and reordered file naming/organization * ran make gotidy * updated internal stanza version * updated pkg/stanza for WEL * added go.sum changes * make gotidy
Description:
Added Windows Event Logging Functionality based on the corresponding log-collection operator.
Link to tracking Issue:
(#9225)
Testing:
windowslog_test.go
verifies that event logs can be read from the Windows APIDocumentation:
(See README)