From d50381d1d7448bea55df1b146cec4460ecede658 Mon Sep 17 00:00:00 2001 From: Raj Nishtala <113392743+rnishtala-sumo@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:53:29 -0400 Subject: [PATCH] fix(timestamp): Fix the timestamp locator for log sources (#3853) * fix(timestamp): fix the timestamp locator for logs * fix(timestamp): Fix the timestamp locator for log sources --- .changelog/3853.fixed.txt | 1 + deploy/helm/sumologic/values.yaml | 4 ++-- .../testdata/goldenfile/terraform/all_fields.output.yaml | 8 ++++---- .../goldenfile/terraform/collector_fields.output.yaml | 8 ++++---- .../testdata/goldenfile/terraform/default.output.yaml | 8 ++++---- .../terraform/disable_default_metrics.output.yaml | 8 ++++---- .../goldenfile/terraform/disabled_dashboards.output.yaml | 8 ++++---- .../goldenfile/terraform/disabled_monitors.output.yaml | 8 ++++---- .../testdata/goldenfile/terraform/logs_fields.output.yaml | 8 ++++---- .../monitors_with_email_notifications.output.yaml | 8 ++++---- .../terraform/monitors_with_single_email.output.yaml | 8 ++++---- .../goldenfile/terraform/strip_extrapolation.output.yaml | 8 ++++---- .../terraform/tracing-metrics-disabled.output.yaml | 8 ++++---- 13 files changed, 47 insertions(+), 46 deletions(-) create mode 100644 .changelog/3853.fixed.txt diff --git a/.changelog/3853.fixed.txt b/.changelog/3853.fixed.txt new file mode 100644 index 0000000000..544dceff19 --- /dev/null +++ b/.changelog/3853.fixed.txt @@ -0,0 +1 @@ +fix(timestamp): Fix the timestamp locator for log sources \ No newline at end of file diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index a2217aed8d..8dba5553ab 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -224,7 +224,7 @@ sumologic: default_date_formats: ## Ensures that timestamp key has precedence over timestamp auto discovery - format: epoch - locator: '\"timestamp\":(\\d+)' + locator: '"timestamp":(\d+)' # filters: # - name: "Test Exclude Debug" @@ -243,7 +243,7 @@ sumologic: default_date_formats: ## Ensures that timestamp key has precedence over timestamp auto discovery - format: epoch - locator: '\"timestamp\":(\\d+)' + locator: '"timestamp":(\d+)' default-otlp: name: events-otlp config-name: endpoint-events-otlp diff --git a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml index a32a0e408d..c8fe20e7c4 100644 --- a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -758,7 +758,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -768,7 +768,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml index 7023674cfe..d86ee77542 100644 --- a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/default.output.yaml b/tests/helm/testdata/goldenfile/terraform/default.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/default.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/default.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml index 180a9068c1..f519147f90 100644 --- a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -702,7 +702,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -712,7 +712,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml index be1e22e8a1..6b1e0d1a35 100644 --- a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml index 2627425448..c5012e2219 100644 --- a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml @@ -598,7 +598,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -610,7 +610,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -708,7 +708,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -718,7 +718,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs" diff --git a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml index 2352e9bf1f..83165842ae 100644 --- a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml @@ -597,7 +597,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -609,7 +609,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ] } @@ -707,7 +707,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "events" @@ -717,7 +717,7 @@ data: "default_date_formats": [ { "format": "epoch", - "locator": "\\\"timestamp\\\":(\\\\d+)" + "locator": "\"timestamp\":(\\d+)" } ], "name": "logs"