Git Product home page Git Product logo

Comments (10)

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024 1

Oh yah
i missed this infact. Thanks for pointing it. I will try to check this in my free time.

from fluentd.

Lusitaniae avatar Lusitaniae commented on September 26, 2024 1

Maybe can close this one, since it was implemented on the plugin itself, and I also filed an issue there

fluent/fluent-plugin-prometheus#219

from fluentd.

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024

@Lusitaniae I have one query with this. I understand you want to expose it in compressed format but can you name few metrics collectors that scrape in compressed format and decompresses it?
I have worked with Telegraf and chronocollector and both don't support scraping metrics that are in compressed format

I guess if this is not the standard then not sure if its a genuine feature request

from fluentd.

Lusitaniae avatar Lusitaniae commented on September 26, 2024

Should work for prometheus

https://github.com/prometheus/prometheus/blob/main/scrape/scrape.go#L729

https://prometheus.io/docs/instrumenting/exposition_formats/

from fluentd.

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024

I see
For now it seems only gzip format is supported
Maybe I can pick this up in the following week

from fluentd.

Lusitaniae avatar Lusitaniae commented on September 26, 2024

Much appreciated 🙏

from fluentd.

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024

@Lusitaniae This would require to contribute to https://github.com/prometheus/client_ruby/blob/main/lib/prometheus/client/formats/text.rb the official prometheus client for ruby. The hackaround for this is we break the abstractions in the Fluentd prometheus plugin to fetch the metrics info and compress and host directly. Not sure which is a better call because maybe first is overkill but I feel that's the write method

from fluentd.

Lusitaniae avatar Lusitaniae commented on September 26, 2024

Doesn't this solve it?

It's highly recommended to enable gzip compression for the metrics endpoint, for example by including the Rack::Deflater middleware.

https://github.com/prometheus/client_ruby?tab=readme-ov-file#rack-middleware

from fluentd.

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024

I was checking this @Lusitaniae. So for the Rack middleware to be used we need to have the app(http server) exposed and get overriden with the middleware. But i guess the code abstraction in fluentd has made use of a plugin helper so seems like its not as direct as we see. I am actively checking how to make use of it but incase if you also find something interesting please let me know

For now i am not using rack but trying to compress the data directly and put it in the response body

from fluentd.

Athishpranav2003 avatar Athishpranav2003 commented on September 26, 2024

@kenhys the PR is done for this and reviewed by @ashie. I guess u can change the label to the appropriate one
fluent/fluent-plugin-prometheus#223

from fluentd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.