Closed arnitolog closed 11 months ago
@arnitolog please try using | json status="status"
instead of just | json
| Json
without parameters is the slowest parser in the stack. Please try avoiding it.
Currently we're thinking about how to replace it. Any help is appreciated.
@arnitolog for your case something like
| regexp `"status": ?"(?P<status>[0-9]+)"`
can go even faster than | json status...
Please always prefer | regexp
over json a=...
, over | json
.
got it. thanks @akvlad. But I'm not sure that it will be really easy and helpful to use regexp during the incidents and troubleshooting by developers. Anyway, thanks for the answer.
Hello, I see that JSON parser heavily loads CPU on qryn instance. I'm trying to calculate count_over_time for status codes for the ingress controller. here is what the query looks like:
sum by(status) (count_over_time({ProductComponents="ingress-nginx"} | json [10m]))
It seems that the query is dropped due to timeout 30s, so it is not able to return any results: Here is how qryn CPU usage looks like during this execution: here is an example of the log message:with available labels:
Am I doing it wrong? Or are there any ways to improve the performance?