metrico / qryn

⭐️ All-in-One Polyglot Observability with OLAP Storage for Logs, Metrics, Traces & Profiles. Drop-in Grafana Cloud replacement compatible with Loki, Prometheus, Tempo, Pyroscope, Opentelemetry, Datadog and beyond :rocket:
https://qryn.dev
GNU Affero General Public License v3.0
1.24k stars 68 forks source link

sum over count with json parsed field #305

Closed timansky closed 1 year ago

timansky commented 1 year ago

Having a problem with query


  count_over_time(
  {
    foo="bar"
  }
  | json
  [1m])
) by (json_exported_field)```

returns null or some times return not full result (last n minute where request time range is bigger than n) 

clickhouse: 22.9.7.34
qryn: 2.2.14
timansky commented 1 year ago
sum_by_json_field sum
akvlad commented 1 year ago

Thanks for the issue raise, @timansky . Working on it. Even after this issue is resolved parameterless | json operator may appear too slow for the data volume you have. Please use | json level_name="level.name" instead. It works now and it's much faster than the parameterless one.

timansky commented 1 year ago

yes, query with specifying the field is working as expected

sum(
    count_over_time(
  {
    foo="bar"
  }
  | json json_exported_field ="json_exported_field"
  [$__interval])
) by (json_exported_field)
akvlad commented 1 year ago

Fixed. Json with no params should work since v2.2.16.

akvlad commented 1 year ago

Close the issue as resolved. Please reopen if needed.