Skip to content
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 suppress_rendering_info parameter and simplify internal logic. #34720

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Aug 16, 2024

Description:

This PR contains several changes described in #34131. It does not go as far as breaking out a separate parsing component, but I think it is enough to satisfy the known use cases.

  • Add suppress_rendering_info parameter, which acts orthogonally to raw flag.
  • Remove RemoteServer field from EventXML. Instead, set attributes["remote_server"] if remote collection is used.

Link to tracking Issue:

Resolves #34131

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

Looks to be going in the right direction.

pkg/stanza/operator/input/windows/event.go Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/event.go Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/event.go Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/xml.go Outdated Show resolved Hide resolved
@pjanotti
Copy link
Contributor

pjanotti commented Sep 4, 2024

@djaglowski ping me when you think this one is ready (or if you want another pass while still a draft)

@djaglowski
Copy link
Member Author

djaglowski commented Sep 4, 2024

Thanks @pjanotti, I'm still just trying to get it to pass CI. There have been a bunch of unrelated tests failing but now it's just https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10706954934/job/29685874116?pr=34720#step:6:556, which may or may not be related. I don't know if you have any insight on that one but if you do it would be very helpful.

@pjanotti
Copy link
Contributor

pjanotti commented Sep 5, 2024

@djaglowski there is something really going on with these tests, when I submitted the PR with the overall changes to the tests I wasn't getting any failure on my machine, but, now it seems almost constant. Nothing conclusive yet but will be looking more deeply into it.

djaglowski added a commit that referenced this pull request Sep 13, 2024
I noticed on #34720 and #35026 that execution of the test continued
beyond a failure of `require.EventuallyWithT`. Based on the description
alone, I would expect that using `assert` within
`require.EventuallyWithT` should cause execution to stop if the
assertion fails, but it appears this may not be the case. However, this
change apparently works as intended.
djaglowski added a commit that referenced this pull request Sep 20, 2024
This is a step towards #34720 which should have no user facing impact.
It consolidates the event model by removing the notion of a "raw" event.
The behavior of `raw` flag should remain the same because we still use
different functions to build the output from the unified event.
@djaglowski djaglowski force-pushed the wel-supress-rendering-info branch 3 times, most recently from 1570f19 to f69210b Compare September 23, 2024 17:21
@djaglowski djaglowski marked this pull request as ready for review September 23, 2024 20:55
@djaglowski djaglowski requested a review from a team as a code owner September 23, 2024 20:55
@djaglowski
Copy link
Member Author

@pjanotti I believe this is ready for a review now

pkg/stanza/operator/input/windows/input.go Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Outdated Show resolved Hide resolved
pkg/stanza/docs/operators/windows_eventlog_input.md Outdated Show resolved Hide resolved
receiver/windowseventlogreceiver/README.md Outdated Show resolved Hide resolved
pkg/stanza/docs/operators/windows_eventlog_input.md Outdated Show resolved Hide resolved
.chloggen/wel-supress-rendering-info2.yaml Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Outdated Show resolved Hide resolved
pkg/stanza/operator/input/windows/input.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM - minus a typo.

pkg/stanza/operator/input/windows/config_windows.go Outdated Show resolved Hide resolved
@djaglowski djaglowski merged commit da9d94c into open-telemetry:main Sep 27, 2024
172 checks passed
@djaglowski djaglowski deleted the wel-supress-rendering-info branch September 27, 2024 02:28
@github-actions github-actions bot added this to the next release milestone Sep 27, 2024
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
…y#35032)

I noticed on open-telemetry#34720 and open-telemetry#35026 that execution of the test continued
beyond a failure of `require.EventuallyWithT`. Based on the description
alone, I would expect that using `assert` within
`require.EventuallyWithT` should cause execution to stop if the
assertion fails, but it appears this may not be the case. However, this
change apparently works as intended.
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
This is a step towards open-telemetry#34720 which should have no user facing impact.
It consolidates the event model by removing the notion of a "raw" event.
The behavior of `raw` flag should remain the same because we still use
different functions to build the output from the unified event.
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
…simplify internal logic. (open-telemetry#34720)

**Description:**

This PR contains several changes described in open-telemetry#34131. It does not go as
far as breaking out a separate parsing component, but I think it is
enough to satisfy the known use cases.

- Add `suppress_rendering_info` parameter, which acts orthogonally to
`raw` flag.
- Remove `RemoteServer` field from `EventXML`. Instead, set
`attributes["remote_server"]` if remote collection is used.

**Link to tracking Issue:**

Resolves
open-telemetry#34131
djaglowski added a commit that referenced this pull request Oct 15, 2024
This PR contains some cleanup following #34720.

This slightly changes some log messages. It also propagates errors
encountered by sending to the next operator (which was done for other
operators in #33847).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/stanza receiver/windowseventlog Run Windows Enable running windows test on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/windowseventlog] Decouple rendering logic from 'raw'
4 participants