Skip to content
Open
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 @@ -11,7 +11,7 @@ processors:
if: "ctx.parsed?.timestamp != null"
field: parsed.timestamp
target_field: "@timestamp"
formats: ["yyyy-MM-dd HH:mm:ss,SSSZ"]
formats: ["yyyy-MM-dd HH:mm:ss,SSSZ", "ISO8601"]
ignore_failure: true

# 2. Platform report logs (time field)
Expand Down Expand Up @@ -43,6 +43,18 @@ processors:
copy_from: parsed._aws
ignore_failure: true

- set:
field: aws.lambda.message.log
if: "ctx.parsed?.message != null && ctx.parsed?.message instanceof String"
copy_from: parsed.message
ignore_failure: true

- set:
field: aws.lambda.message
if: "ctx.parsed?.message != null && ctx.parsed?.message instanceof Map"
copy_from: parsed.message
ignore_failure: true

- rename:
field: parsed.service
target_field: service.name
Expand Down Expand Up @@ -231,6 +243,13 @@ processors:
ignore_failure: true
if: "ctx['@timestamp'] == null"

- rename:
field: parsed.timestamp
target_field: "@timestamp"
ignore_missing: true
ignore_failure: true
if: "ctx['@timestamp'] == null"

- rename:
field: parsed.errorMessage
target_field: aws.lambda.error.message
Expand Down Expand Up @@ -273,18 +292,6 @@ processors:
ignore_missing: true
ignore_failure: true

- rename:
field: parsed.time
target_field: "@timestamp"
ignore_missing: true
ignore_failure: true

- rename:
field: parsed.timestamp
target_field: "@timestamp"
ignore_missing: true
ignore_failure: true

- rename:
field: parsed.type
target_field: aws.lambda.event_type
Expand Down Expand Up @@ -346,12 +353,6 @@ processors:
ignore_missing: true
ignore_failure: true

- rename:
field: parsed.timestamp
target_field: "@timestamp"
ignore_missing: true
ignore_failure: true

- rename:
field: parsed.tracing.xray_trace_id
target_field: aws.lambda.xray_trace_id
Expand Down Expand Up @@ -417,6 +418,7 @@ processors:
field: aws.lambda.message
copy_from: event.original
if: "ctx.parsed == null"
ignore_failure: true

- remove:
field: parsed
Expand All @@ -431,6 +433,7 @@ processors:
- script:
description: Drops null/empty values recursively
lang: painless
ignore_failure: true
source: |
boolean drop(Object o) {
if (o == null || o == "") {
Expand Down