You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BenEfrati
changed the title
Regression: Duplicate Key in JSON After #31694
[exporter/elasticsearch] Regression: Duplicate Key in JSON After #31694
Jun 2, 2024
**Description:**
`Sort()` or `Dedup()` call was missing before runnin `Serialize()` with
ECS mapping enabled
**Link to tracking Issue:**
Fixes#33264
**Testing:** Added UT
**Documentation:** -
Component(s)
exporter/elasticsearch
What happened?
Description
Previously, the request to ELK contained a well-structured JSON object with unique keys:
However, after the change, the JSON format has been modified, resulting in a duplicate host key:
This duplicate key renders the JSON invalid, leading to parsing errors from ELK:
Steps to Reproduce
add the following resource attribute to OTLP request
host.name: Str(hostname)
os.description: Str(Windows 11 10.0)
os.type: Str(windows)
Expected Result
ELK successfully parses the JSON data and processes it without errors.
Actual Result
ELK encounters a parsing error due to the duplicate host key, and the data is not processed successfully.
Collector version
0.101.0
Environment information
Environment
Not relevant
OpenTelemetry Collector configuration
Log output
Additional context
#31694 (comment)
The text was updated successfully, but these errors were encountered: