Skip to content

Conversation

@schmikei
Copy link
Contributor

@schmikei schmikei commented Sep 4, 2025

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

@schmikei schmikei force-pushed the feat/unroll-processor branch from 524321d to 06fcd1e Compare September 4, 2025 17:14
@schmikei schmikei force-pushed the feat/unroll-processor branch from 7134574 to 33a9762 Compare September 4, 2025 17:31
@schmikei schmikei marked this pull request as ready for review September 4, 2025 19:49
@schmikei schmikei requested a review from a team as a code owner September 4, 2025 19:49
@schmikei schmikei requested a review from pjanotti September 4, 2025 19:49
@atoulme atoulme added the Sponsor Needed New component seeking sponsor label Sep 6, 2025
@schmikei schmikei force-pushed the feat/unroll-processor branch from 1ea8573 to 0ad63a2 Compare September 11, 2025 13:30
@atoulme atoulme marked this pull request as draft September 22, 2025 05:17
@atoulme
Copy link
Contributor

atoulme commented Sep 22, 2025

Moving to draft while you secure a sponsor.

@schmikei
Copy link
Contributor Author

@atoulme I believe @axw was willing to sponsor. @axw would you mind when you have a free moment to take a look at this PR and let me know what you think? Also looking to confirm that I am good to add you as a codeowner for this component?

#42491 (comment)

Copy link
Contributor

@axw axw left a 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

Comment on lines 32 to 35
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)
Copy link
Contributor

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 axw marked this pull request as ready for review September 23, 2025 01:28
Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

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

LGTM!

@axw axw added ready to merge Code review completed; ready to merge by maintainers and removed Sponsor Needed New component seeking sponsor labels Sep 24, 2025
@songy23 songy23 merged commit 5f8b07f into open-telemetry:main Sep 25, 2025
214 of 215 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 25, 2025
@schmikei schmikei deleted the feat/unroll-processor branch September 25, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Code review completed; ready to merge by maintainers reports/distributions/contrib.yaml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New component: unrollprocessor

6 participants