Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dynamic templates from otel-plugin that set index:false #113409

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,6 @@
"default_metric": "value_count"
}
}
},
{
"histogram": {
"mapping": {
"type": "histogram",
"ignore_malformed": true
}
}
},
{
"counter_long": {
"mapping": {
"type": "long",
"time_series_metric": "counter",
"ignore_malformed": true
}
}
},
{
"gauge_long": {
"mapping": {
"type": "long",
"time_series_metric": "gauge",
"ignore_malformed": true
}
}
},
{
"counter_double": {
"mapping": {
"type": "double",
"time_series_metric": "counter",
"ignore_malformed": true
}
}
},
{
"gauge_double": {
"mapping": {
"type": "double",
"time_series_metric": "gauge",
"ignore_malformed": true
}
}
}
],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,33 @@ template:
type: keyword
time_series_dimension: true
ignore_above: 1024
dynamic_templates:
- histogram:
mapping:
type: histogram
ignore_malformed: true
- counter_long:
mapping:
type: long
time_series_metric: counter
ignore_malformed: true
- gauge_long:
mapping:
type: long
time_series_metric: gauge
ignore_malformed: true
- counter_double:
mapping:
type: double
time_series_metric: counter
ignore_malformed: true
- gauge_double:
mapping:
type: double
time_series_metric: gauge
ignore_malformed: true
- summary:
mapping:
type: aggregate_metric_double
metrics: sum, value_count
default_metric: value_count
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _meta:
description: default OpenTelemetry metrics template installed by x-pack
managed: true
composed_of:
- metrics@mappings
- metrics@tsdb-settings
- otel@mappings
- metrics-otel@mappings
Expand Down Expand Up @@ -38,4 +37,3 @@ template:
ignore_above: 1024
type: keyword
match_mapping_type: string

Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,21 @@ IP dimensions:
expand_wildcards: hidden
- match: { .$idx0name.mappings.properties.resource.properties.attributes.properties.host\.ip.type: 'ip' }
- match: { .$idx0name.mappings.properties.attributes.properties.philip.type: "keyword" }
---
"Long data type in attributes must be accepted":
- do:
indices.get_index_template:
name: metrics-otel@template
- length: {index_templates: 1}
- do:
bulk:
index: metrics-generic.otel-default
refresh: true
body:
- create: {}
- '{"@timestamp":"2024-07-18T14:48:33.467654000Z","attributes":{"processor.pid": 17}}'
- is_false: errors
- do:
search:
index: metrics-generic.otel-default
- length: { hits.hits: 1 }