Skip to content

Commit 076047f

Browse files
committed
Addressed review comments
Signed-off-by: Krishna Kondaka <[email protected]>
1 parent 3ccda29 commit 076047f

6 files changed

+164
-87
lines changed

Diff for: data-prepper-plugins/opensearch/src/main/resources/index-template/logs-otel-v1-index-standard-template.json

+10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@
6060
"path_match": "attributes.*",
6161
"match_mapping_type": "double"
6262
}
63+
},
64+
{
65+
"string_attributes": {
66+
"mapping": {
67+
"type": "keyword",
68+
"ignore_above": 256
69+
},
70+
"path_match": "attributes.*",
71+
"match_mapping_type": "string"
72+
}
6373
}
6474
],
6575
"properties": {

Diff for: data-prepper-plugins/opensearch/src/main/resources/index-template/metrics-otel-v1-index-standard-template.json

+114-87
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,110 @@
66
"_source": {
77
"enabled": true
88
},
9-
"properties": {
10-
"name": {
11-
"type": "text",
12-
"fields": {
13-
"keyword": {
9+
"dynamic_templates": [
10+
{
11+
"long_resource_attributes": {
12+
"mapping": {
13+
"type": "long"
14+
},
15+
"path_match": "resource.attributes.*",
16+
"match_mapping_type": "long"
17+
}
18+
},
19+
{
20+
"double_resource_attributes": {
21+
"mapping": {
22+
"type": "double"
23+
},
24+
"path_match": "resource.attributes.*",
25+
"match_mapping_type": "double"
26+
}
27+
},
28+
{
29+
"long_scope_attributes": {
30+
"mapping": {
31+
"type": "long"
32+
},
33+
"path_match": "instrumentationScope.attributes.*",
34+
"match_mapping_type": "long"
35+
}
36+
},
37+
{
38+
"double_scope_attributes": {
39+
"mapping": {
40+
"type": "double"
41+
},
42+
"path_match": "instrumentationScope.attributes.*",
43+
"match_mapping_type": "double"
44+
}
45+
},
46+
{
47+
"long_attributes": {
48+
"mapping": {
49+
"type": "long"
50+
},
51+
"path_match": "attributes.*",
52+
"match_mapping_type": "long"
53+
}
54+
},
55+
{
56+
"double_attributes": {
57+
"mapping": {
58+
"type": "double"
59+
},
60+
"path_match": "attributes.*",
61+
"match_mapping_type": "double"
62+
}
63+
},
64+
{
65+
"string_attributes": {
66+
"mapping": {
1467
"type": "keyword",
1568
"ignore_above": 256
16-
}
69+
},
70+
"path_match": "attributes.*",
71+
"match_mapping_type": "string"
1772
}
18-
},
19-
"droppedEventsCount": {
73+
}
74+
],
75+
"properties": {
76+
"droppedAttributesCount": {
2077
"type": "integer"
2178
},
22-
"attributes": {
23-
"type": "object",
79+
"instrumentationScope": {
2480
"properties": {
25-
"data_stream": {
26-
"properties": {
27-
"dataset": {
28-
"ignore_above": 128,
29-
"type": "keyword"
30-
},
31-
"namespace": {
32-
"ignore_above": 128,
33-
"type": "keyword"
34-
},
35-
"type": {
36-
"ignore_above": 56,
37-
"type": "keyword"
38-
}
39-
}
81+
"droppedAttributesCount": {
82+
"type": "integer"
83+
},
84+
"schemaUrl": {
85+
"type": "keyword",
86+
"ignore_above": 256
87+
},
88+
"name": {
89+
"type": "keyword",
90+
"ignore_above": 128
91+
},
92+
"version": {
93+
"type": "keyword",
94+
"ignore_above": 64
4095
}
4196
}
4297
},
4398
"resource": {
4499
"properties": {
45-
"attributes": {
46-
"type": "object"
47-
},
48-
"droppedEventsCount": {
49-
"type": "integer"
50-
}
100+
"droppedAttributesCount": {
101+
"type": "integer"
102+
},
103+
"schemaUrl": {
104+
"type": "keyword",
105+
"ignore_above": 256
106+
}
51107
}
52108
},
109+
"name": {
110+
"type": "keyword",
111+
"ignore_above": 256
112+
},
53113
"description": {
54114
"type": "text",
55115
"fields": {
@@ -60,37 +120,34 @@
60120
}
61121
},
62122
"flags": {
63-
"type": "integer"
123+
"type": "long"
64124
},
65125
"unit": {
66126
"type": "keyword",
67127
"ignore_above": 128
68128
},
69129
"kind": {
70130
"type": "keyword",
71-
"ignore_above": 128
131+
"ignore_above": 32
72132
},
73133
"aggregationTemporality": {
74134
"type": "keyword",
75-
"ignore_above": 128
135+
"ignore_above": 64
76136
},
77137
"monotonic": {
78138
"type": "boolean"
79139
},
80140
"startTime": {
81-
"type": "date"
141+
"type": "date_nanos"
82142
},
83143
"@timestamp": {
84-
"type": "date"
85-
},
86-
"time": {
87144
"type": "date_nanos"
88145
},
89-
"observedTimestamp": {
146+
"time": {
90147
"type": "date_nanos"
91148
},
92149
"value@int": {
93-
"type": "integer"
150+
"type": "long"
94151
},
95152
"value@double": {
96153
"type": "double"
@@ -108,10 +165,10 @@
108165
"type": "double"
109166
},
110167
"max": {
111-
"type": "float"
168+
"type": "double"
112169
},
113170
"min": {
114-
"type": "float"
171+
"type": "double"
115172
}
116173
}
117174
},
@@ -122,10 +179,10 @@
122179
"type": "long"
123180
},
124181
"explicitBoundsList": {
125-
"type": "float"
182+
"type": "double"
126183
},
127184
"explicitBoundsCount": {
128-
"type": "float"
185+
"type": "double"
129186
},
130187
"quantiles": {
131188
"properties": {
@@ -147,10 +204,10 @@
147204
"type": "long"
148205
},
149206
"max": {
150-
"type": "float"
207+
"type": "double"
151208
},
152209
"min": {
153-
"type": "float"
210+
"type": "double"
154211
}
155212
}
156213
},
@@ -161,10 +218,10 @@
161218
"type": "long"
162219
},
163220
"max": {
164-
"type": "float"
221+
"type": "double"
165222
},
166223
"min": {
167-
"type": "float"
224+
"type": "double"
168225
}
169226
}
170227
},
@@ -181,13 +238,13 @@
181238
"type": "long"
182239
},
183240
"max": {
184-
"type": "float"
241+
"type": "double"
185242
},
186243
"min": {
187-
"type": "float"
244+
"type": "double"
188245
},
189246
"sum": {
190-
"type": "float"
247+
"type": "double"
191248
},
192249
"count": {
193250
"type": "long"
@@ -204,49 +261,19 @@
204261
"spanId": {
205262
"ignore_above": 256,
206263
"type": "keyword"
207-
}
208-
}
209-
},
210-
"instrumentationScope": {
211-
"properties": {
212-
"name": {
213-
"type": "text",
214-
"fields": {
215-
"keyword": {
216-
"type": "keyword",
217-
"ignore_above": 128
218-
}
219-
}
220264
},
221-
"version": {
222-
"type": "text",
223-
"fields": {
224-
"keyword": {
225-
"type": "keyword",
226-
"ignore_above": 256
227-
}
228-
}
265+
"value@int": {
266+
"type": "long"
229267
},
230-
"droppedAttributesCount": {
231-
"type": "integer"
268+
"value@double": {
269+
"type": "double"
232270
},
233-
"attributes": {
234-
"type": "object"
235-
}
236-
}
237-
}
238-
},
239-
"schemaUrl": {
240-
"type": "text",
241-
"fields": {
242-
"keyword": {
243-
"type": "keyword",
244-
"ignore_above": 256
271+
"value": {
272+
"type": "double"
245273
}
246274
}
247275
}
248276
}
249277
}
250278
}
251279
}
252-

Diff for: data-prepper-plugins/opensearch/src/main/resources/index-template/otel-v1-apm-span-index-standard-template.json

+10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@
6060
"path_match": "attributes.*",
6161
"match_mapping_type": "double"
6262
}
63+
},
64+
{
65+
"string_attributes": {
66+
"mapping": {
67+
"type": "keyword",
68+
"ignore_above": 256
69+
},
70+
"path_match": "attributes.*",
71+
"match_mapping_type": "string"
72+
}
6373
}
6474
],
6575
"properties": {

Diff for: data-prepper-plugins/opensearch/src/main/resources/logs-otel-v1-index-standard-template.json

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
"path_match": "attributes.*",
6060
"match_mapping_type": "double"
6161
}
62+
},
63+
{
64+
"string_attributes": {
65+
"mapping": {
66+
"type": "keyword",
67+
"ignore_above": 256
68+
},
69+
"path_match": "attributes.*",
70+
"match_mapping_type": "string"
71+
}
6272
}
6373
],
6474
"properties": {

Diff for: data-prepper-plugins/opensearch/src/main/resources/metrics-otel-v1-index-standard-template.json

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
"path_match": "attributes.*",
6060
"match_mapping_type": "double"
6161
}
62+
},
63+
{
64+
"string_attributes": {
65+
"mapping": {
66+
"type": "keyword",
67+
"ignore_above": 256
68+
},
69+
"path_match": "attributes.*",
70+
"match_mapping_type": "string"
71+
}
6272
}
6373
],
6474
"properties": {

Diff for: data-prepper-plugins/opensearch/src/main/resources/otel-v1-apm-span-index-standard-template.json

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
"path_match": "attributes.*",
6060
"match_mapping_type": "double"
6161
}
62+
},
63+
{
64+
"string_attributes": {
65+
"mapping": {
66+
"type": "keyword",
67+
"ignore_above": 256
68+
},
69+
"path_match": "attributes.*",
70+
"match_mapping_type": "string"
71+
}
6272
}
6373
],
6474
"properties": {

0 commit comments

Comments
 (0)