Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)
```