Skip to content

Commit

Permalink
fix(timestamp): Fix the timestamp locator for log sources (#3853)
Browse files Browse the repository at this point in the history
* fix(timestamp): fix the timestamp locator for logs

* fix(timestamp): Fix the timestamp locator for log sources
  • Loading branch information
rnishtala-sumo authored Oct 9, 2024
1 parent e56746e commit d50381d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 46 deletions.
1 change: 1 addition & 0 deletions .changelog/3853.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix(timestamp): Fix the timestamp locator for log sources
4 changes: 2 additions & 2 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -758,7 +758,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -768,7 +768,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
8 changes: 4 additions & 4 deletions tests/helm/testdata/goldenfile/terraform/default.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -702,7 +702,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -712,7 +712,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -609,7 +609,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -707,7 +707,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -717,7 +717,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand All @@ -610,7 +610,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
]
}
Expand Down Expand Up @@ -708,7 +708,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "events"
Expand All @@ -718,7 +718,7 @@ data:
"default_date_formats": [
{
"format": "epoch",
"locator": "\\\"timestamp\\\":(\\\\d+)"
"locator": "\"timestamp\":(\\d+)"
}
],
"name": "logs"
Expand Down
Loading

0 comments on commit d50381d

Please sign in to comment.