Skip to content

Commit

Permalink
Merge branch 'master' into prom_support
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Oct 23, 2023
2 parents 4f876aa + 0e898f5 commit d4b8456
Show file tree
Hide file tree
Showing 33 changed files with 427 additions and 361 deletions.
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@


:rocket: **qryn** is a _drop-in Grafana compatible_ **polyglot observability** framework<br/>
- **Logs, Metrics and Traces** living happily together. Locksmith compatible with multiple vendors formats.
- **Logs, Metrics and Traces** living happily together. Drop-in compatible with multiple vendors formats.
- Native [LogQL/PromQL/TempoQL APIs](https://qryn.cloud) support for [querying](https://github.com/lmangani/qryn/wiki/LogQL-for-Beginners), [processing](https://github.com/lmangani/qryn/wiki/LogQL-Supported-Queries), [tracing](https://github.com/lmangani/qryn/wiki/Tempo-Tracing) and [alerting](https://github.com/lmangani/qryn/wiki/Ruler---Alerts) [^2] in [Grafana](http://docs.grafana.org/features/explore/) [^3]
- Search, filter and extract metrics from _logs, events, spans and traces_ using familiar languages. _SQL Optional_.
- Ingestion [APIs](https://qryn.metrico.in/#/support) transparently compatible with [Opentelemetry, Loki, Prometheus, InfluxDB, Elastic](https://qryn.dev) _and [more](https://github.com/metrico/otel-collector)_
- Dynamically search, filter and extract metrics from _logs, events, spans and traces_. _NO SQL required_.
- Ready to use with popular Agents such as [Promtail, Grafana-Agent, Vector, Logstash, Telegraf](https://qryn.metrico.in/#/ingestion) _and more_
- Built in [Explore UI](https://github.com/metrico/cloki-view) and [CLI](https://github.com/lmangani/vLogQL) for querying supported datasources
- Designed for edge _(js/wasm)_ and core/backend deployments _(go/rust)_.
- Designed for edge _(js/bun/wasm)_ and core/backend deployments _(golang/rust)_.
- Total data control. Compatible with [ClickHouse](https://clickhouse.com/) or [InfluxDB IOx](https://influxdata.com) with S3 object storage.
-

:rocket: **qryn.cloud** is the _supercharged_ **qryn** version developed in _go_ with additional _functionality, speed and features!_<br/>

<br>
Expand Down Expand Up @@ -132,14 +132,6 @@ Whether it's code, documentation or grammar, we ❤️ all contributions. Not su

©️ QXIP BV, released under the GNU Affero General Public License v3.0. See [LICENSE](LICENSE) for details.

We encourage forking and changing the code, hacking around with it, and experimenting. If you modify the qryn source code, and run that modified code in a way that's accessible over a network, you _must_ make your modifications to the source code available following the guidelines of the license:
```
[I]f you modify the Program, your modified version must prominently offer all users interacting with it remotely
through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source from a network server at no charge, through
some standard or customary means of facilitating copying of software.
```


[^1]: qryn is not affiliated or endorsed by Grafana Labs or ClickHouse Inc. All rights belong to their respective owners.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qryn",
"version": "2.4.1",
"version": "2.4.3",
"description": "Polyglot Observability Stack with ClickHouse storage",
"main": "qryn.mjs",
"bin": {
Expand Down
14 changes: 10 additions & 4 deletions parser/registry/smart_optimizations/optimization_v3_2.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const { getDuration, dist, Aliased } = require('../common')
const { getDuration, Aliased } = require('../common')
const reg = require('./log_range_agg_reg_v3_2')
const Sql = require('@cloki/clickhouse-sql')
const { DATABASE_NAME, checkVersion } = require('../../../lib/utils')
const streamSelectorReg = require('../stream_selector_operator_registry')
const aggOpReg = require('../high_level_aggregation_registry')
const { clusterName } = require('../../../common')
const logger = require('../../../lib/logger')
const _dist = clusterName ? '_dist' : ''

/**
*
Expand Down Expand Up @@ -46,14 +49,15 @@ module.exports.apply = (token, fromNS, toNS, stepNS) => {
: Sql.Gt('samples.timestamp_ns', fromNS)
let q = (new Sql.Select())
.select(['samples.fingerprint', 'fingerprint'])
.from([`${DATABASE_NAME()}.metrics_15s`, 'samples'])
.from([`${DATABASE_NAME()}.metrics_15s${_dist}`, 'samples'])
.where(tsClause)
q.join(new Aliased(`${DATABASE_NAME()}.time_series${dist}`, 'time_series'), 'left any',
q.join(new Aliased(`${DATABASE_NAME()}.time_series`, 'time_series'), 'left any',
Sql.Eq('samples.fingerprint', new Sql.Raw('time_series.fingerprint')))
q.select([new Sql.Raw('any(JSONExtractKeysAndValues(time_series.labels, \'String\'))'), 'labels'])

q.ctx = {
step: stepNS / 1000000000
step: stepNS / 1000000000,
inline: !!clusterName
}

for (const streamSelectorRule of token.Children('log_stream_selector_rule')) {
Expand All @@ -68,5 +72,7 @@ module.exports.apply = (token, fromNS, toNS, stepNS) => {
q = aggOpReg[aggOp.Child('aggregation_operator_fn').value](aggOp, q)
}

logger.debug(q.toString())

return q
}
24 changes: 17 additions & 7 deletions view/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
{
"files": {
"main.css": "/static/css/main.cdb19822.css",
"main.js": "/static/js/main.b3d5d4c3.js",
"main.css": "/static/css/main.91f5a756.css",
"main.js": "/static/js/main.b5a8989c.js",
"static/js/14.934f9e37.chunk.js": "/static/js/14.934f9e37.chunk.js",
"static/js/368.6610f292.chunk.js": "/static/js/368.6610f292.chunk.js",
"static/css/380.87716002.chunk.css": "/static/css/380.87716002.chunk.css",
"static/js/380.ce6a5eca.chunk.js": "/static/js/380.ce6a5eca.chunk.js",
"static/js/886.192408f9.chunk.js": "/static/js/886.192408f9.chunk.js",
"static/js/261.2d8f2bda.chunk.js": "/static/js/261.2d8f2bda.chunk.js",
"static/js/966.0d040013.chunk.js": "/static/js/966.0d040013.chunk.js",
"static/js/826.afd610f0.chunk.js": "/static/js/826.afd610f0.chunk.js",
"static/js/119.3b6be156.chunk.js": "/static/js/119.3b6be156.chunk.js",
"static/js/345.689efdc6.chunk.js": "/static/js/345.689efdc6.chunk.js",
"static/js/951.d000bc13.chunk.js": "/static/js/951.d000bc13.chunk.js",
"static/media/logs_icon.png": "/static/media/logs_icon.09d704bc457f4670bc5d.png",
"static/media/qryn-logo.png": "/static/media/qryn-logo.26a5a5a8cc98abd3f4b1.png",
"static/media/metrics_icon.png": "/static/media/metrics_icon.5c6e7fed7a326bf2e476.png",
"static/media/traces_icon.png": "/static/media/traces_icon.f163c9469c353d621a8b.png",
"index.html": "/index.html",
"main.cdb19822.css.map": "/static/css/main.cdb19822.css.map",
"main.b3d5d4c3.js.map": "/static/js/main.b3d5d4c3.js.map"
"index.html": "/index.html"
},
"entrypoints": [
"static/css/main.cdb19822.css",
"static/js/main.b3d5d4c3.js"
"static/css/main.91f5a756.css",
"static/js/main.b5a8989c.js"
]
}
Binary file removed view/cloki-logo.png
Binary file not shown.
Binary file modified view/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion view/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="like Loki, but for ClickHouse"/><base href="/"><link rel="apple-touch-icon" href="cloki-logo.png"/><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500:700&display=swap"/><title>👁 qryn view</title><script defer="defer" src="/static/js/main.b3d5d4c3.js"></script><link href="/static/css/main.cdb19822.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="like Loki, but for ClickHouse"/><base href="/"><link rel="apple-touch-icon" href="qryn-logo.png"/><link rel="manifest" href="manifest.json"/><title>Qryn-View</title><script defer="defer" src="/static/js/main.b5a8989c.js"></script><link href="/static/css/main.91f5a756.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div style="height:100%" id="root"></div></body></html>
Binary file added view/qryn-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions view/static/css/380.87716002.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4b8456

Please sign in to comment.