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

Feat: logspipelineprocessor: read/address body fields in pipeline operators directly if body is json #416

Conversation

raj-k-singh
Copy link
Contributor

@raj-k-singh raj-k-singh commented Oct 4, 2024

fixes https://github.com/SigNoz/engineering-pod/issues/1582

This PR brings in a copy of body_field.go from opentelemetry-collector-contrib stanza and modifies it to allow reading from fields inside bodies containing JSON text

To use this custom body field, this PR also brings in a copy of field.go from otel collector contrib stanza and modifies it to unmarshal body field references into our custom body field copy

Operator configs have also been updated to use signozstanzaentry.Field instead of entry.Field to enable reading from body JSON.
To achieve this, the PR also brings in copies of stanza helpers used for defining operator configs - for eg: parser.go.
Some helper dependencies were in "internal" packages and had to be copied over too for use here - eg: ctimefmt.go

All files that have been copied over have comments at the top of the file indicating the same and mentioning any changes that have been made.

@raj-k-singh raj-k-singh force-pushed the feat/logspipelineprocessor-address-body-fields-directly-if-body-is-json branch from 7fb98ca to 3fae4f0 Compare October 8, 2024 08:52
@raj-k-singh raj-k-singh marked this pull request as draft October 8, 2024 08:59
@raj-k-singh raj-k-singh marked this pull request as ready for review October 8, 2024 09:05
@raj-k-singh raj-k-singh merged commit 55229e1 into main Oct 10, 2024
3 checks passed
@raj-k-singh raj-k-singh deleted the feat/logspipelineprocessor-address-body-fields-directly-if-body-is-json branch October 10, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants