File tree Expand file tree Collapse file tree 4 files changed +48
-46
lines changed
core/template-resources/src/main/resources
yamlRestTest/resources/rest-api-spec/test Expand file tree Collapse file tree 4 files changed +48
-46
lines changed Original file line number Diff line number Diff line change 43
43
"default_metric" : " value_count"
44
44
}
45
45
}
46
- },
47
- {
48
- "histogram" : {
49
- "mapping" : {
50
- "type" : " histogram" ,
51
- "ignore_malformed" : true
52
- }
53
- }
54
- },
55
- {
56
- "counter_long" : {
57
- "mapping" : {
58
- "type" : " long" ,
59
- "time_series_metric" : " counter" ,
60
- "ignore_malformed" : true
61
- }
62
- }
63
- },
64
- {
65
- "gauge_long" : {
66
- "mapping" : {
67
- "type" : " long" ,
68
- "time_series_metric" : " gauge" ,
69
- "ignore_malformed" : true
70
- }
71
- }
72
- },
73
- {
74
- "counter_double" : {
75
- "mapping" : {
76
- "type" : " double" ,
77
- "time_series_metric" : " counter" ,
78
- "ignore_malformed" : true
79
- }
80
- }
81
- },
82
- {
83
- "gauge_double" : {
84
- "mapping" : {
85
- "type" : " double" ,
86
- "time_series_metric" : " gauge" ,
87
- "ignore_malformed" : true
88
- }
89
- }
90
46
}
91
47
],
92
48
"properties" : {
Original file line number Diff line number Diff line change @@ -15,3 +15,33 @@ template:
15
15
type : keyword
16
16
time_series_dimension : true
17
17
ignore_above : 1024
18
+ dynamic_templates :
19
+ - histogram :
20
+ mapping :
21
+ type : histogram
22
+ ignore_malformed : true
23
+ - counter_long :
24
+ mapping :
25
+ type : long
26
+ time_series_metric : counter
27
+ ignore_malformed : true
28
+ - gauge_long :
29
+ mapping :
30
+ type : long
31
+ time_series_metric : gauge
32
+ ignore_malformed : true
33
+ - counter_double :
34
+ mapping :
35
+ type : double
36
+ time_series_metric : counter
37
+ ignore_malformed : true
38
+ - gauge_double :
39
+ mapping :
40
+ type : double
41
+ time_series_metric : gauge
42
+ ignore_malformed : true
43
+ - summary :
44
+ mapping :
45
+ type : aggregate_metric_double
46
+ metrics : sum, value_count
47
+ default_metric : value_count
Original file line number Diff line number Diff line change 8
8
description : default OpenTelemetry metrics template installed by x-pack
9
9
managed : true
10
10
composed_of :
11
- - metrics@mappings
12
11
- metrics@tsdb-settings
13
12
- otel@mappings
14
13
- metrics-otel@mappings
@@ -38,4 +37,3 @@ template:
38
37
ignore_above : 1024
39
38
type : keyword
40
39
match_mapping_type : string
41
-
Original file line number Diff line number Diff line change @@ -178,3 +178,21 @@ IP dimensions:
178
178
expand_wildcards : hidden
179
179
- match : { .$idx0name.mappings.properties.resource.properties.attributes.properties.host\.ip.type: 'ip' }
180
180
- match : { .$idx0name.mappings.properties.attributes.properties.philip.type: "keyword" }
181
+ ---
182
+ " Long data type in attributes must be accepted " :
183
+ - do :
184
+ indices.get_index_template :
185
+ name : metrics-otel@template
186
+ - length : {index_templates: 1}
187
+ - do :
188
+ bulk :
189
+ index : metrics-generic.otel-default
190
+ refresh : true
191
+ body :
192
+ - create : {}
193
+ - ' {"@timestamp":"2024-07-18T14:48:33.467654000Z","attributes":{"processor.pid": 17}}'
194
+ - is_false : errors
195
+ - do :
196
+ search :
197
+ index : metrics-generic.otel-default
198
+ - length : { hits.hits: 1 }
You can’t perform that action at this time.
0 commit comments