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

WIP: MongoDB-like Filtering #270

Closed lmangani closed 1 year ago

lmangani commented 1 year ago

This PR adds an output post-processor plugin using the mongo-query-compiler library to offer additional result filtering capabilities. README included.

Usage:

mongo({$where: 'this.stream.event === "user"'}, {type="syslog"} | json )

Raw JS equivalent:

var streams = response.data.result
let logquery = {$where: 'this.stream.event === "user"'}
let logfilterer = compileMongoQuery(logquery);
let logresults = streams.filter(logfilterer);

Links:

socket-security[bot] commented 1 year ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
mongo-query-compiler 1.0.5 eval +1 75.5 kB aptivator
lmangani commented 1 year ago

Archived