You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there :]
I'm seeing some great stuff in this library. Though I think it doesn't compose nicely at the moment.
I would like to add the metric tracking layer and the views, without the global setup and export route.
Currently the library does everything with one layer.
Creating your global MeterProvider and Registry
Adding views to the MeterProvider
Set up a Meter and tracking axum metrics
Adding a /metrics route to export on
Ideally we can pick-and-choose from this.
Rough outline of what that could be.
The views don't take any arguments, so could be a static method or it's own builder, say ViewBuilder::default().build()
The layer would exclusively measure, and it's builder could have an optional MeterProvider using the global one if None.
The export router would be a separate builder. Which could either take the current approach (make a new MeterProvider & Registry pair and set it as global) or be created from arguments passed in.
The text was updated successfully, but these errors were encountered:
Very good advice.
It's just that I don't have enough time to do this refactoring at the moment. PR is welcome -_-
Also, I think besides pull mode prometheus exporter,
We also need to support other exporters, such as otlp.
Under this design, the prometheus specific /metrics endpoint should be an optional feature.
Hey there :]
I'm seeing some great stuff in this library. Though I think it doesn't compose nicely at the moment.
I would like to add the metric tracking layer and the views, without the global setup and export route.
Currently the library does everything with one layer.
/metrics
route to export onIdeally we can pick-and-choose from this.
Rough outline of what that could be.
The views don't take any arguments, so could be a static method or it's own builder, say
ViewBuilder::default().build()
The layer would exclusively measure, and it's builder could have an optional
MeterProvider
using the global one if None.The export router would be a separate builder. Which could either take the current approach (make a new MeterProvider & Registry pair and set it as global) or be created from arguments passed in.
The text was updated successfully, but these errors were encountered: