-
Notifications
You must be signed in to change notification settings - Fork 156
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 to mount on rails #237
Comments
Mounting it in Rails routes is an interesting idea. Then again this comes with a lot of caveats and possible security implications, because you'd need to make sure to not expose metrics collection and metrics scraping endpoints to the public. And it only works for web processes, you'd still need a solution for other long running processes like Sidekiq and friends. What we did for our containerized services was to write a little extension to prometheus_exporter that starts the prometheus_exporter server in a thread in your puma, sidekiq or any other long running process that you have. This fits great into containerized environments like Kubernetes, which is what we are using, where you usually want to just start a single process per container. That's why we called that approach "prometheus_exporter-native". |
@wolfgangrittner any chance of open sourcing your extension? Even as a separate repo/gist |
Yes, was thinking about doing that, but I just didn't find the time yet 😞 Fyi, we recently ran into issues with our approach: as soon as you use any kind of pod auto scaling (like HPA or whatever), running prometheus_exporter inside your containers (that are torn down when pods are scaled down) is not so great anymore. |
@wolfgangrittner so are you running it in its own dedicated pod? That's the approach I was considering actually, my concern is if some data gets lost in the process (like host name etc.) |
@adamk9k, actually we haven't solved that issue yet, we don't auto-scale that much yet and currently just live with maybe losing some metrics when scaling down. |
I try to use this gem with "prometheus_exporter", "~> 2.0" And I wants to mount this prometheus_exporter to rails routes but according to my research and a lot of tries i found that it is not allow to mount. On the other hand yabeda-prometheus-exporter allowing to mount check it here
The text was updated successfully, but these errors were encountered: