[confgenerator] Fix Message, EventCategory and EventType in windows_event_log_v1.#2198
Merged
Merged
Conversation
Message EventCategory and EventType in windows_event_log_v1.Message, EventCategory and EventType in windows_event_log_v1.
4ad9261 to
6b0e81f
Compare
Message, EventCategory and EventType in windows_event_log_v1.Message, EventCategory and EventType in windows_event_log_v1.
This was referenced Feb 6, 2026
Message, EventCategory and EventType in windows_event_log_v1.Message, EventCategory and EventType in windows_event_log_v1.
quentinmit
approved these changes
Feb 10, 2026
Comment on lines
881
to
895
| "jsonPayload.channel": {OmitIf: `jsonPayload.channel =~ ".*"`}, | ||
| "jsonPayload.computer": {OmitIf: `jsonPayload.computer =~ ".*"`}, | ||
| "jsonPayload.details": {OmitIf: `jsonPayload.details != nil`}, | ||
| "jsonPayload.event_data": {OmitIf: `jsonPayload.event_data != nil`}, | ||
| "jsonPayload.event_id": {OmitIf: `jsonPayload.event_id != nil`}, | ||
| "jsonPayload.execution": {OmitIf: `jsonPayload.execution != nil`}, | ||
| "jsonPayload.keywords": {OmitIf: `jsonPayload.keywords != nil`}, | ||
| "jsonPayload.level": {OmitIf: `jsonPayload.level =~ ".*"`}, | ||
| "jsonPayload.message": {StaticValue: &defaultMessage}, | ||
| "jsonPayload.opcode": {OmitIf: `jsonPayload.opcode =~ ".*"`}, | ||
| "jsonPayload.provider": {OmitIf: `jsonPayload.provider != nil`}, | ||
| "jsonPayload.record_id": {OmitIf: `jsonPayload.record_id != nil`}, | ||
| "jsonPayload.security": {OmitIf: `jsonPayload.security != nil`}, | ||
| "jsonPayload.system_time": {OmitIf: `jsonPayload.system_time =~ ".*"`}, | ||
| "jsonPayload.task": {OmitIf: `jsonPayload.task =~ ".*"`}, |
Member
There was a problem hiding this comment.
I think you can just set jsonPayload directly:
"jsonPayload": {StaticValue: &defaultMessage},
instead of having to enumerate all the individual fields.
Contributor
Author
There was a problem hiding this comment.
This doesn't work at the moment, probably we would have to update the Lua Accessor implementation :
go test ./transformation_test -update
--- FAIL: TestTransformationTests (3.01s)
--- FAIL: TestTransformationTests/logging_processor-windows_event_log_raw_xml (2.99s)
--- FAIL: TestTransformationTests/logging_processor-windows_event_log_raw_xml/fluent-bit (0.00s)
panic: failed to convert jsonPayload to Lua accessor: field "jsonPayload" not found [recovered]
panic: failed to convert jsonPayload to Lua accessor: field "jsonPayload" not found
goroutine 187 [running]:
testing.tRunner.func1.2({0x3051680, 0xc001d16f80})
/usr/local/google/home/fcovalente/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.4.linux-amd64/src/testing/testing.go:1734 +0x21c
testing.tRunner.func1()
/usr/local/google/home/fcovalente/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.4.linux-amd64/src/testing/testing.go:1737 +0x35e
panic({0x3051680?, 0xc001d16f80?})
/usr/local/google/home/fcovalente/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.4.linux-amd64/src/runtime/panic.go:792 +0x132
github.com/GoogleCloudPlatform/ops-agent/confgenerator.LoggingProcessorModifyFields.Components(...)
/usr/local/google/h
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Details :
XMLrecord to preserve non-rendered and non-parsed fields.ContainValuesto check forEventTypecases in the old Windows Event Log API.Notes :
RenderingInfosyscall (suppress_rendering_info: truedoes this, but dropsMessagesince its part ofRenderingInfo)Messagesecurity message.Related issue
How has this been tested?
Checklist:
Footnotes
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.145.0/receiver/windowseventlogreceiver ↩