Skip to content

Commit 19319d4

Browse files
authored
Map scope.name as a dimension (elastic#120590) (elastic#120614)
1 parent 4c01807 commit 19319d4

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

docs/changelog/120590.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120590
2+
summary: Map `scope.name` as a dimension
3+
area: Data streams
4+
type: bug
5+
issues: []

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ template:
3232
name:
3333
type: keyword
3434
ignore_above: 1024
35+
time_series_dimension: true
3536
version:
3637
type: version
3738
schema_url:

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,29 @@ Empty IP field:
279279
fields: ["*"]
280280
- length: { hits.hits: 1 }
281281
- match: { hits.hits.0._ignored: ["resource.attributes.host.ip"] }
282+
---
283+
Metrics with different scope names are not duplicates:
284+
- do:
285+
bulk:
286+
index: metrics-generic.otel-default
287+
refresh: true
288+
body:
289+
- create: {"dynamic_templates":{"metrics.foo.bar":"counter_long"}}
290+
- "@timestamp": 2024-07-18T14:00:00Z
291+
scope:
292+
name: foo
293+
resource:
294+
attributes:
295+
service.name: foo
296+
metrics:
297+
foo.bar: 42
298+
- create: {"dynamic_templates":{"metrics.foo.bar":"counter_long"}}
299+
- "@timestamp": 2024-07-18T14:00:00Z
300+
scope:
301+
name: bar
302+
resource:
303+
attributes:
304+
service.name: foo
305+
metrics:
306+
foo.bar: 42
307+
- is_false: errors

0 commit comments

Comments
 (0)