Skip to content

Commit 21e55a6

Browse files
authored
Add attribute type conflict handling test (#114100) (#114110)
(cherry picked from commit 4438e49)
1 parent f87dc58 commit 21e55a6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

x-pack/plugin/otel-data/src/yamlRestTest/resources/rest-api-spec/test/20_traces_tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,28 @@ setup:
9292
fields: ["data_stream.type"]
9393
- length: { hits.hits: 1 }
9494
- match: { hits.hits.0.fields.data_stream\.type: ["traces"] }
95+
---
96+
Conflicting attribute types:
97+
- do:
98+
bulk:
99+
index: traces-generic.otel-default
100+
refresh: true
101+
body:
102+
- create: {}
103+
- "@timestamp": 2024-10-04T00:00:00
104+
attributes:
105+
http.status_code: 200
106+
- create: {}
107+
- "@timestamp": 2024-10-04T01:00:00
108+
attributes:
109+
http.status_code: "foo"
110+
- is_false: errors
111+
- do:
112+
search:
113+
index: traces-generic.otel-default
114+
body:
115+
fields: ["*"]
116+
"sort" : [ "@timestamp" ]
117+
- length: { hits.hits: 2 }
118+
- match: { hits.hits.0.fields.attributes\.http\.status_code: [200] }
119+
- match: { hits.hits.1._ignored: ["attributes.http.status_code"] }

0 commit comments

Comments
 (0)