-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elasticsearch exporter: Init JSON encoding support (#3101)
**Description:** The change adds support for encoding OpenTelemetry log records to JSON. The encoder tries to remove duplicate entries in case the attribute map (which is an array if key value pairs) contains duplicates. Mixed style attributes, with key names having dots and other fields having attribute maps as value will be normalized, such that the JSON encoding will be either completely flat, or values are properly merged into a single JSON object (when dedot is enabled). The normalization helps with deduplication, and (not yet implemented) dedot support will allow us to present a well formated JSON event if Ingest Node is used (The dedotting in Elasticsearch does happen after Ingest Node). Next: - Dedotting support - Custom (configurable) field mapping - `publishLogs` unit testing - Integration tests **Link to tracking Issue:** #1800 **Testing:** The internal document type with field deduplication is fully tested (89%) via unit tests. The change also hooks up `publishLogs`, but this functionality is not covered by tests yet, as the PR has already grown quite a bit (I tested locally with a custom otel collector distribution). I would like to add additional tests in a separate PR, to keep focused on the JSON encoding only here.
- Loading branch information
Steffen Siering
authored
May 20, 2021
1 parent
f89ebd2
commit 9404a13
Showing
6 changed files
with
870 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.