Skip to content

Commit f074df8

Browse files
gregkalaposandreidan
authored andcommitted
[otel-data] Add profiler_stack_trace_ids as counted_keyword to otel-data mappings (elastic#125608)
* Add profiler_stack_trace_ids as counted_keyword to otel-data mappings * Change prefix for profiler_stack_trace_ids
1 parent 03f73e0 commit f074df8

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

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

+7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ template:
4141
unit: nanos
4242
dropped_events_count:
4343
type: long
44+
attributes:
45+
type: passthrough
46+
dynamic: true
47+
priority: 20
48+
properties:
49+
elastic.profiler_stack_trace_ids:
50+
type: counted_keyword
4451
links:
4552
synthetic_source_keep: arrays
4653
properties:

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

+18
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,21 @@ traces@lifecycle:
140140
index: $datastream-backing-index
141141
- is_true: $datastream-backing-index
142142
- match: { .$datastream-backing-index.settings.index.lifecycle.name: "traces@lifecycle" }
143+
---
144+
"profiler_stack_trace_ids field should have type counted_keyword":
145+
- do:
146+
bulk:
147+
index: traces-generic.otel-default
148+
refresh: true
149+
body:
150+
- create: {}
151+
- '{"@timestamp":"2024-07-18T14:49:33.467654000Z","data_stream":{"dataset":"generic.otel","namespace":"default"}, "span_id":"1", "attributes": {"elastic.profiler_stack_trace_ids": "S7VyNjRieh4zCEmv7MiwwAcaFlvHvn1cleFkExsq-nbA"}}'
152+
- is_false: errors
153+
- do:
154+
indices.get_data_stream:
155+
name: traces-generic.otel-default
156+
- set: { data_streams.0.indices.0.index_name: idx0name }
157+
- do:
158+
indices.get_mapping:
159+
index: $idx0name
160+
- match: { .$idx0name.mappings.properties.attributes.properties.elastic\.profiler_stack_trace_ids.type: 'counted_keyword' }

0 commit comments

Comments
 (0)