-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[processor/unroll]: upstream unroll processor #42500
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
524321d to
06fcd1e
Compare
7134574 to
33a9762
Compare
…etry-collector-contrib into feat/unroll-processor
…tor-contrib into feat/unroll-processor
…tor-contrib into feat/unroll-processor
…etry-collector-contrib into feat/unroll-processor
1ea8573 to
0ad63a2
Compare
…tor-contrib into feat/unroll-processor
|
Moving to draft while you secure a sponsor. |
axw
left a comment
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, sorry I missed this earlier @schmikei. Just let a couple of minor comments.
Also looking to confirm that I am good to add you as a codeowner for this component?
No problem
| for i := 0; i < ld.ResourceLogs().Len(); i++ { | ||
| rls := ld.ResourceLogs().At(i) | ||
| for j := 0; j < rls.ScopeLogs().Len(); j++ { | ||
| sls := rls.ScopeLogs().At(j) |
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.
Nit: I think this could be simplified by using the "All" iterator methods, e.g. see https://pkg.go.dev/go.opentelemetry.io/collector/pdata/plog#ResourceLogsSlice.All
axw
left a comment
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!
Description
Adds a new log processor component that will take a log body of slices and expand them into multiple log entries within the ScopeLogs.
This is a component we made in the Bindplane Distro of the Collector. We initially solved it for logs without proper parsing extensions. This pairs quite well with the transformprocessor to Split and unroll say based off improperly formatted newlines depending on the receiver sending the data.
Link to tracking issue
Fixes #42491
Testing
Believe to be properly unit tested, however its been a second since I've added a component so happy to add some more tests where they are applicable.
Documentation