-
Notifications
You must be signed in to change notification settings - Fork 137
📝 [Proposal]: monitor middleware absolute counter #1282
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
Comments
@dolvany Hello, for the next major version of Fiber we migrated the monitor middleware to the contrib repo. We also have a draft of a Prometheus middleware that will provide more standard metrics for developers/users. New monitor middleware for v3: https://github.com/gofiber/contrib/tree/main/monitor Prometheus Middleware Draft: #1032 My guess is that the Prometheus middleware answers your proposal? |
@gaby Thanks for the remarkably quick response. My preference is for an agnostic solution, precisely the functionality that currently exists. I will make this proposal over there. Ah, I see the issue is already moved. Thanks! |
@dolvany By absolute counter, do you mean:
|
@gaby both would be more useful as a counter rather than a gauge. Gauges are fine for things like memory and cpu. Things like connections, requests and tx/rx bytes are more useful as counters. |
@gaby thinking deeper, match counters would be awesome. Like every time something matches an app.Use or app.Get. Though I don't know if there is a good way to associate unique identifiers with each Use/Get/Etc. |
There is ways, but this pushing into becoming the Prometheus middleware which already handles all that. |
The monitor middleware is more for a quick glance at the server usage. Metrics are usually handle via Prometheus or OTEL, you don't want to create your own metrics format since it won't integrate with existing industry tools (ex: Grafana). |
Curling json metrics on a cron and outputting influx format with jq is a simple solution that integrates perfectly with grafana. Even the aforementioned absolute request counter would be very useful. Just surfacing my use case. Thanks for the consideration. |
Feature Proposal Description
Thanks for this awesome http framework. It is great that metrics are being bolted onto fiber, which allows me to poll the json and get those metrics into influx/grafana. Though, a connections gauge is not very useful for this purpose as it is lossy. Unless the gauge is polled during a connections spike, it goes unnoticed. An absolute counter would be vastly more useful.
Alignment with Express API
I am not familiar with monitoring in express.
HTTP RFC Standards Compliance
Not applicable.
API Stability
Not applicable.
Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: