Issue with Parsing Dash in Signoz Logs Query
TLDR Saad was having trouble with COVID's handling of dashes in the logs query. Srikanth informed it's fixed in the latest release, recommending an upgrade to 0.33.1.
1
Nov 03, 2023 (1 month ago)
Saad
04:06 PMI have JSON logs in signoz and they are parsed correctly.
However, I noticed that Signoz doesn’t handle correctly dash
-
within the logs query.For example: if the build query I would have this filter
body.metadata.headers.x-forwarded-scheme = https
Which translate to this filter item in the query to the
Signoz
API {
"id": "15fa61fe-7815-40ca-a29b-ba1ed942dfbb",
"key": {
"id": "------",
"dataType": "string",
"key": "body.metadata.headers.x-forwarded-scheme",
"isColumn": false,
"type": "",
"isJSON": true
},
"op": "=",
"value": "https"
}
and it lands on this error
{
"status": "error",
"data": {
"A": "code: 36, message: Unable to parse JSONPath: while executing 'FUNCTION JSON_EXISTS(body : 1, '$.metadata.headers.x-forwarded-scheme' : 12) -\u003e JSON_EXISTS(body, '$.metadata.headers.x-forwarded-scheme') UInt8 : 20'"
},
"errorType": "bad_data",
"error": "error in builder queries"
}
Obviously, there are no logs found on the UI.
I just wanted to know whether this is the expected behavior?
Is there a hack I can implement on the Query builder to make it work?
Nov 06, 2023 (1 month ago)
Srikanth
03:48 AM1
SigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
SigNoz Log Format and JSON Parsing
Luke asked about the log format for SigNoz and using operators to convert loggers. nitya-signoz shared resources about specifications and recommended using operators. Travis had issues with JSON parsing but resolved them by updating `otel-agent-config.yaml`.
JSON Parsing Issue with Logs in Signoz
Androw had trouble parsing logs with JSON in Signoz. nitya-signoz suggested changes to config, which resolved the issue after Androw added the missing field 'logsCollection'.
Extracting Custom Fields as Attributes from Log in SigNoz
Harald wants to have custom fields from their body parsed as attributes in the SigNoz logger. They have tried implementing suggestions from nitya-signoz and Prashant, but the issue remains unsolved due to a potential race condition encountered while executing the code. They have provided a full example using Kind for further assistance.