Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metrico/promql2logql
PromQL to LogQL Transpiler for qryn.dev
https://github.com/metrico/promql2logql
logql loki promql qryn
Last synced: 5 days ago
JSON representation
PromQL to LogQL Transpiler for qryn.dev
- Host: GitHub
- URL: https://github.com/metrico/promql2logql
- Owner: metrico
- License: agpl-3.0
- Created: 2022-08-08T14:39:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-07T12:42:58.000Z (over 1 year ago)
- Last Synced: 2024-08-02T15:51:06.913Z (3 months ago)
- Topics: logql, loki, promql, qryn
- Language: JavaScript
- Homepage: https://qryn.dev
- Size: 78.1 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prom2logql
PromQL to LogQL template based transpiler for [qryn](https://metrico.in)[![Node.js CI](https://github.com/lmangani/promql2logql/actions/workflows/test.yml/badge.svg)](https://github.com/lmangani/promql2logql/actions/workflows/test.yml)
### Status
* Experimental! Do not use it.## Usage
```
const { prom2log, prom2labels } = require('@qxip/promql2logql');
const logql = prom2log(promql);
const labels = prom2labels(promql);
```## Example
Input:
```
rate(foo{"bar"="baz")[5m]) by (x,y)
```
Output:
```
rate({__name__="foo", bar="baz"} | unwrap_value [300s]) by (x,y)
```