#support

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.

Powered by Struct AI

1

Nov 03, 2023 (1 month ago)
Saad
Photo of md5-ecab04b75bfab44d3283f9a88ca36076
Saad
04:06 PM
Hello everyone,

I 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
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
03:48 AM
This is fixed in latest release https://github.com/SigNoz/signoz/issues/3860. Please upgrade to 0.33.1

1