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

Prometheus metrics ingestion: snappy compression issue (Fastify) #288

Closed inatale closed 1 year ago

inatale commented 1 year ago

Hello team! Thank for your product. We are testing it right now for gathering logs and metrics. We have successfully configured logs ingestion using Vector agent and your Loki inteface.

But we have an issue with metrics ingestion. We send Prometheus metrics but receive an error from remote write: Unsupported Content-Encoding: snappy FastifyCompressError: Unsupported Content-Encoding: snappy at Object.preParsing (/app/node_modules/@fastify/compress/index.js:315:24) at next (/app/node_modules/fastify/lib/route.js:552:16) at preParsingHookRunner (/app/node_modules/fastify/lib/route.js:575:3) at runPreParsing (/app/node_modules/fastify/lib/route.js:526:5) at next (/app/node_modules/fastify/lib/hooks.js:168:7) at Object.onRequest (/app/node_modules/@fastify/compress/index.js:205:5) at hookIterator (/app/node_modules/fastify/lib/hooks.js:246:10) at next (/app/node_modules/fastify/lib/hooks.js:174:16) at /app/node_modules/@fastify/cors/index.js:130:12 at resolveOriginOption (/app/node_modules/@fastify/cors/index.js:88:129)

We have investigated it and found out that the issue is related to Fastify library (probably 4.10 version). Fastify doesn't support snappy compression which is used sending packages. We could mitigate the issue falling down to 2.1.56 image tag. In the next to 2.1.56 release you have stated that change something with compression (that is related to the issue).

lmangani commented 1 year ago

Thanks for the report @inatale we're looking into this and will have an update shortly.

FYI and to save you precious time in case this is relevant: qryn-js happily ingests any metrics in many formats, but mind it currently only offers a promql-to-logql transpiler with a few limitations, until our flux integration is completed to swap it out. Full PromQL query support is currently available on qryn.cloud already.

akvlad commented 1 year ago

@inatale hello. Should be fixed in v2.2.3. Please check.

inatale commented 1 year ago

@akvlad thank you. Now it works. Only tag is not v2.2.4 but v2.2.6.