Skip to content

Commit 71b8459

Browse files
committed
[apm-data] Set event.dataset if empty for logs
1 parent ffa423d commit 71b8459

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

x-pack/plugin/apm-data/src/main/resources/ingest-pipelines/[email protected]

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ description: |
1010
custom pipelines. All built-in processing occurs in the final
1111
pipelines.
1212
processors:
13+
# Set event.dataset if unset to meet Anomaly Detection requirements
14+
- set:
15+
if: "ctx.data_stream?.dataset != null"
16+
field: event.dataset
17+
value: "{{{data_stream.dataset}}}"
18+
override: false
1319
# Invoke user-defined custom pipelines, in ascending order of specificity:
1420
- pipeline:
1521
name: global@custom

x-pack/plugin/apm-data/src/main/resources/ingest-pipelines/[email protected]

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ description: |
1010
custom pipelines. All built-in processing occurs in the final
1111
pipelines.
1212
processors:
13+
# Set event.dataset if unset to meet Anomaly Detection requirements
14+
- set:
15+
if: "ctx.data_stream?.dataset != null"
16+
field: event.dataset
17+
value: "{{{data_stream.dataset}}}"
18+
override: false
1319
# Invoke user-defined custom pipelines, in ascending order of specificity:
1420
- pipeline:
1521
name: global@custom

x-pack/plugin/apm-data/src/main/resources/resources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# "version" holds the version of the templates and ingest pipelines installed
22
# by xpack-plugin apm-data. This must be increased whenever an existing template or
33
# pipeline is changed, in order for it to be updated on Elasticsearch upgrade.
4-
version: 13
4+
version: 14
55

66
component-templates:
77
# Data lifecycle.

0 commit comments

Comments
 (0)