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

Global compression handlers #265

Closed lmangani closed 1 year ago

lmangani commented 1 year ago

Testing @fastify/compress global compression/decompression handlers Potential fix for https://github.com/metrico/qryn/issues/239

akvlad commented 1 year ago

@lmangani @Dletta

these can be affected by regressions. Please recheck in your test labs

lmangani commented 1 year ago

@Dletta could you validate the MVs still work with this PR?

Dletta commented 1 year ago

Confirmed MV's still work. Sending some gzipped data.

Dletta commented 1 year ago

Confirmed it successfully unzips insert data.

Dletta commented 1 year ago

On read requests as below:

var result = await axios.get('http://qryn.ip:3100/loki/api/v1/query_range?direction=backward&end=1671132590580000000&limit=1000&query=%7Blevel%3D%22Warning%22%7D&start=1671128990580000000&step=10000ms', {
    headers: {
      'Accept-Encoding': 'gzip'
    }
  })
  .catch((e)=> {
    console.log('error in get requests gzip:', e)
  })
  console.log('AXIOS gzip read', result.headers, result.status, result.statusText)

gzip is not returned to client asking for it.