Skip to content

Commit e5135c5

Browse files
committed
[otel_format] minor fixes to get this working
The ":header" variable is hex-encoded since it can be binary. So, the regex needs to match that. Since "timestamp_ns" is a string and not a number, a "timestamp-format" of "%9" should be used instead of "timestamp-divisor". Related to #1613
1 parent de21fa1 commit e5135c5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/formats/otel_collector_log.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"converter": {
1010
"header": {
1111
"expr": {
12-
"otel_collector": ":header REGEXP '.*\"resourceLogs\".*'"
12+
"otel_collector": ":header REGEXP '.*227265736f757263654c6f677322.*'"
1313
},
1414
"size": 100
1515
},
@@ -52,15 +52,13 @@
5252
"trace": "TRACE"
5353
},
5454
"timestamp-field": "timestamp_ns",
55-
"timestamp-divisor": 1000000,
55+
"timestamp-format": [
56+
"%9"
57+
],
5658
"body-field": "body",
5759
"opid-field": "trace_id",
5860
"hide-extra": true,
5961
"value": {
60-
"timestamp_ns": {
61-
"kind": "string",
62-
"hidden": true
63-
},
6462
"observed_ns": {
6563
"kind": "string",
6664
"hidden": true

0 commit comments

Comments
 (0)