-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow serving compresses responses via Prometheus plugin #4501
Comments
@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 guess if this is not the standard then not sure if its a genuine feature request |
I see |
Much appreciated 🙏 |
@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 |
Doesn't this solve it?
https://github.com/prometheus/client_ruby?tab=readme-ov-file#rack-middleware |
Oh yah |
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 |
@kenhys the PR is done for this and reviewed by @ashie. I guess u can change the label to the appropriate one |
Maybe can close this one, since it was implemented on the plugin itself, and I also filed an issue there |
Is your feature request related to a problem? Please describe.
I'm using Prometheus plugin to export metrics based on logs ingested by fluentd.
In some servers these metrics can amount to millions of lines, which reach payload sizes of 50/60Mb and either reach the scraping limit (set by vmagent), or they failed to be transitted within the timeout period (10s)
Compressing data would be a clear winner to solve this problem
Describe the solution you'd like
Allow prometheus plugin to send compressed responses
Describe alternatives you've considered
Bumping payload limits / timeouts
Additional context
Cross posted from fluent/fluent-plugin-prometheus#219 in case this is the right place to implement such feature
The text was updated successfully, but these errors were encountered: