out_splunk: added otlp metadata support #10035
Merged
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.
This PR adds OTLP metadata support to the splunk output plugin and it improves the way in which group metadata is exposed to client code to prevent unintended meta records from being pushed to endpoints that do not expect them.
Technical notes :
In this PR the log event decoder component has been modified to prevent unsuspecting plugins from receiving meta records that hold group attributes. In order to achieve this the default value of
read_groups
has been changed toFLB_FALSE
and its meaning reinterpreted to mean that the client code wants raw access to group metadata records rather than having the decoder transparently providing access to the information while not delivering them directly throughflb_log_event_decoder_next
.What this means is that while the client code iterates the record set using
flb_log_event_decoder_next
two newstruct flb_log_event
fields namedgroup_metadata
andgroup_attributes
will be set to point to the appropri 8000 atemsgpack_object
instances if the record is part of a record group orNULL
otherwise.