[8.17](backport #45008) [OTel] Support Serializing nested data#45024
Closed
mergify[bot] wants to merge 1 commit into8.17from
Closed
[8.17](backport #45008) [OTel] Support Serializing nested data#45024mergify[bot] wants to merge 1 commit into8.17from
mergify[bot] wants to merge 1 commit into8.17from
Conversation
This adds support for `map[string]any` and also arrays in general (as opposed to just slices) to the converted map. Like `mapstr.M` and `[]mapstr.M`, this will dive into the `map[string]any` and `[]map[string]any` objects to ensure that they are properly converted for the pdata code. (cherry picked from commit 7bfa78e) # Conflicts: # libbeat/otelbeat/otelmap/otelmap.go # libbeat/otelbeat/otelmap/otelmap_test.go
Contributor
Author
|
Cherry-pick of 7bfa78e has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
This pull request doesn't have a |
7 tasks
Member
|
Code not in 8.17. |
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.
This adds support for
map[string]anyand also arrays in general (as opposed to just slices) to the converted map.Like
mapstr.Mand[]mapstr.M, this will dive into themap[string]anyand[]map[string]anyobjects to ensure that they are properly converted for the pdata code.Proposed commit message
Properly handles nested
map[string]anyand array types (not just slices) for OTel conversion to avoidInvalid typewarnings from OTel.Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
This should make the code more flexible -- not less.
Author's Checklist
How to test this PR locally
The easiest way is to inspect the new test and try removing the updated code to see what changes.
Related issues
[]any#45007Use cases
Metricsets can now ship nested
map[string]anythat contain arrays and slices, including of[]map[string]any.This is an automatic backport of pull request #45008 done by Mergify.