Skip to content

Commit 991cff9

Browse files
[otel-data] Hide 10m and 60m aggregated metrics generated for the APM UI (#114042)
* Hide aggregated metrics generated for the APM UI * Update 30_aggregated_metrics_tests.yml * Review feedback - Introduced templates for 1 minute aggregations - Moved dynamic templates `ecs_ip` and `all_strings_to_keywords` into a dedicated file and now I pull the file in instead of repeating them - Introduced `metrics-[x]m.otel@custom` - Added tests with terms aggregation that assert by default 1 bucket (only 1m) with metricsset.interval, and with allowing hidden indices it's 3 buckets (1m, 10m, 60m) * Update 30_aggregated_metrics_tests.yml Simplify - no need to separate tests for the 3bucket queries. * Rename metrics-otel-fixed@mappings to ecs-tsdb@mappings --------- Co-authored-by: Elastic Machine <[email protected]>
1 parent fb7a36d commit 991cff9

16 files changed

+938
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: ${xpack.oteldata.template.version}
2+
_meta:
3+
description: |
4+
Default mappings that can be changed by users for
5+
the OpenTelemetry metrics index template installed by x-pack
6+
managed: true
7+
template:
8+
mappings:
9+
dynamic_templates:
10+
- ecs_ip:
11+
mapping:
12+
type: ip
13+
path_match: [ "ip", "*.ip", "*_ip" ]
14+
match_mapping_type: string
15+
- all_strings_to_keywords:
16+
mapping:
17+
ignore_above: 1024
18+
type: keyword
19+
match_mapping_type: string

x-pack/plugin/otel-data/src/main/resources/index-templates/[email protected]

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ composed_of:
1414
- semconv-resource-to-ecs@mappings
1515
- metrics@custom
1616
- metrics-otel@custom
17+
- ecs-tsdb@mappings
1718
ignore_missing_component_templates:
1819
- metrics@custom
1920
- metrics-otel@custom
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_destination.10m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-10m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-10m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 10m
38+
name:
39+
type: constant_keyword
40+
value: service_destination
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_destination.1m.otel-*"]
4+
priority: 130
5+
data_stream: {}
6+
allow_auto_create: true
7+
_meta:
8+
description: aggregated APM metrics template installed by x-pack
9+
managed: true
10+
composed_of:
11+
- metrics@tsdb-settings
12+
- otel@mappings
13+
- metrics-otel@mappings
14+
- semconv-resource-to-ecs@mappings
15+
- metrics@custom
16+
- metrics-otel@custom
17+
- metrics-1m.otel@custom
18+
- ecs-tsdb@mappings
19+
ignore_missing_component_templates:
20+
- metrics@custom
21+
- metrics-otel@custom
22+
- metrics-1m.otel@custom
23+
template:
24+
settings:
25+
index:
26+
mode: time_series
27+
mappings:
28+
properties:
29+
data_stream.type:
30+
type: constant_keyword
31+
value: metrics
32+
metricset:
33+
properties:
34+
interval:
35+
type: constant_keyword
36+
value: 1m
37+
name:
38+
type: constant_keyword
39+
value: service_destination
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_destination.60m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-60m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-60m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 60m
38+
name:
39+
type: constant_keyword
40+
value: service_destination
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_summary.10m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-10m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-10m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 10m
38+
name:
39+
type: constant_keyword
40+
value: service_summary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_summary.1m.otel-*"]
4+
priority: 130
5+
data_stream: {}
6+
allow_auto_create: true
7+
_meta:
8+
description: aggregated APM metrics template installed by x-pack
9+
managed: true
10+
composed_of:
11+
- metrics@tsdb-settings
12+
- otel@mappings
13+
- metrics-otel@mappings
14+
- semconv-resource-to-ecs@mappings
15+
- metrics@custom
16+
- metrics-otel@custom
17+
- metrics-1m.otel@custom
18+
- ecs-tsdb@mappings
19+
ignore_missing_component_templates:
20+
- metrics@custom
21+
- metrics-otel@custom
22+
- metrics-1m.otel@custom
23+
template:
24+
settings:
25+
index:
26+
mode: time_series
27+
mappings:
28+
properties:
29+
data_stream.type:
30+
type: constant_keyword
31+
value: metrics
32+
metricset:
33+
properties:
34+
interval:
35+
type: constant_keyword
36+
value: 1m
37+
name:
38+
type: constant_keyword
39+
value: service_summary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_summary.60m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-60m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-60m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 60m
38+
name:
39+
type: constant_keyword
40+
value: service_summary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_transaction.10m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-10m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-10m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 10m
38+
name:
39+
type: constant_keyword
40+
value: service_transaction
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_transaction.1m.otel-*"]
4+
priority: 130
5+
data_stream: {}
6+
allow_auto_create: true
7+
_meta:
8+
description: aggregated APM metrics template installed by x-pack
9+
managed: true
10+
composed_of:
11+
- metrics@tsdb-settings
12+
- otel@mappings
13+
- metrics-otel@mappings
14+
- semconv-resource-to-ecs@mappings
15+
- metrics@custom
16+
- metrics-otel@custom
17+
- metrics-1m.otel@custom
18+
- ecs-tsdb@mappings
19+
ignore_missing_component_templates:
20+
- metrics@custom
21+
- metrics-otel@custom
22+
- metrics-1m.otel@custom
23+
template:
24+
settings:
25+
index:
26+
mode: time_series
27+
mappings:
28+
properties:
29+
data_stream.type:
30+
type: constant_keyword
31+
value: metrics
32+
metricset:
33+
properties:
34+
interval:
35+
type: constant_keyword
36+
value: 1m
37+
name:
38+
type: constant_keyword
39+
value: service_transaction
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
version: ${xpack.oteldata.template.version}
3+
index_patterns: ["metrics-service_transaction.60m.otel-*"]
4+
priority: 130
5+
data_stream:
6+
hidden: true
7+
allow_auto_create: true
8+
_meta:
9+
description: aggregated APM metrics template installed by x-pack
10+
managed: true
11+
composed_of:
12+
- metrics@tsdb-settings
13+
- otel@mappings
14+
- metrics-otel@mappings
15+
- semconv-resource-to-ecs@mappings
16+
- metrics@custom
17+
- metrics-otel@custom
18+
- metrics-60m.otel@custom
19+
- ecs-tsdb@mappings
20+
ignore_missing_component_templates:
21+
- metrics@custom
22+
- metrics-otel@custom
23+
- metrics-60m.otel@custom
24+
template:
25+
settings:
26+
index:
27+
mode: time_series
28+
mappings:
29+
properties:
30+
data_stream.type:
31+
type: constant_keyword
32+
value: metrics
33+
metricset:
34+
properties:
35+
interval:
36+
type: constant_keyword
37+
value: 60m
38+
name:
39+
type: constant_keyword
40+
value: service_transaction

0 commit comments

Comments
 (0)