You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see named_tags and payload are parsed as strings.
We'd expect a structure with nested fields or with dot syntax, something like named_tags.client_ip in this way we can build queries and dashboards using those attributes.
We tried to play with pipelines following this guide with no success. We can only extract individual fields, it seems that JSON parse is not able to extract stuff from attributes.
How to reproduce
Given the sample log line configure this pipeline
Parse JSON: body => attributes (create the named_tags attribute with value "{\"client_ip\":\"172.31.29.139\",\"request_id\":\"11cefd3e-d86d-431b-868a-6ce7bbb135f4\",\"user_agent\":\"curl/8.7.1\"}"
Configure a second step to parse JSON from attributes.named_tags => attributes should produce client_ip, request_id and user_agent attributes.
The only thing we were able to do is to perform the steps in the linked guide to extract individual fields, but the content of our payload is very dynamic, it would be a pain to list all the attributes we have.
Also is not clear how multiple pipelines interact, if I have more than one pipeline matching the same log entry would they be all applied?
Because I also tried to add a final pipeline that select logs with named_tags EXISTS with a single processor that says parse_json attributes.named_tags => attributes, if I simulate that pipeline with the eye icon it seems to do what I expect, but then when I activate it it doesn't work.
We're using signoz cloud if that matters.
The text was updated successfully, but these errors were encountered:
I can confirm that adding multiple pipelines works, I added this configuration to my pipelines (for the JSON reported in first issue):
Rule 1 works
Rule 2 works
Rule 3 works and create a top level field attributes.named_tags with JSON value
Rule 4 is a noop, it's not doing anything.
Rule 5 works but for a single field and I don't want to replicate it for all my nested fields
Rule 6 is just a cleanup
Now the funny part, I added another pipeline after the previous one to experiment, its matching criteria is named_tags EXISTS and it selects logs parsed by previous pipeline. It does the following:
Rule 1 should do what I'm trying to achieve and if I preview the rule it seems to work
Rule 2 should do the same for payload we can ignore it for the moment
Rule 3 adds a marker to confirm that log entry was processed by this pipeline
Rule 4 perform cleanup after parsing
The funny thing is that if I simulate the processing of this pipeline it works (check the user_agent field in this screenshot from preview, it includes both named_tags and payload top level attributes
But when I save the rule I don't find those attributes in the real logs, I however find pipelined and named_tags removed.
The call to /api/v1/logs/pipelines/preview shows the following body (part of it)
and it returns the parsed log
So there's clearly something wrong with the preview endpoint since live logs shows a different result.
Bug description
We're struggling at extracting JSON nested fields from our log files using Pipelines, here a sample JSON snippet our app is producing:
We're interested in having all of these values as fields but we're not able to do that.
Expected behavior
JSON Parse of body creates this:
As you can see
named_tags
andpayload
are parsed as strings.We'd expect a structure with nested fields or with dot syntax, something like
named_tags.client_ip
in this way we can build queries and dashboards using those attributes.We tried to play with pipelines following this guide with no success. We can only extract individual fields, it seems that JSON parse is not able to extract stuff from attributes.
How to reproduce
Given the sample log line configure this pipeline
named_tags
attribute with value"{\"client_ip\":\"172.31.29.139\",\"request_id\":\"11cefd3e-d86d-431b-868a-6ce7bbb135f4\",\"user_agent\":\"curl/8.7.1\"}"
attributes.named_tags => attributes
should produceclient_ip
,request_id
anduser_agent
attributes.The only thing we were able to do is to perform the steps in the linked guide to extract individual fields, but the content of our payload is very dynamic, it would be a pain to list all the attributes we have.
Also is not clear how multiple pipelines interact, if I have more than one pipeline matching the same log entry would they be all applied?
Because I also tried to add a final pipeline that select logs with
named_tags EXISTS
with a single processor that saysparse_json attributes.named_tags => attributes
, if I simulate that pipeline with the eye icon it seems to do what I expect, but then when I activate it it doesn't work.We're using signoz cloud if that matters.
The text was updated successfully, but these errors were encountered: