From c9b36f3aff0ee19fef1765092e61340174422682 Mon Sep 17 00:00:00 2001 From: Annie Lee Date: Fri, 18 Mar 2022 10:56:48 -0700 Subject: [PATCH] Update Finding.kt --- .../main/kotlin/org/opensearch/alerting/model/Finding.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/model/Finding.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/Finding.kt index 799bb1b57..bae00cf2c 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/model/Finding.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/Finding.kt @@ -147,7 +147,11 @@ class Finding( } } SEVERITY_FIELD -> severity = xcp.text() - TIMESTAMP_FIELD -> timestamp = requireNotNull(xcp.instant()) + // TODO: Check if the timestamp type is correct + TIMESTAMP_FIELD -> { + timestamp = requireNotNull(xcp.instant()) + log.info("timestamp value: $timestamp") + } TRIGGER_ID_FIELD -> triggerId = xcp.text() TRIGGER_NAME_FIELD -> triggerName = xcp.text() }