1

add open-telemetry middleware and extended prometheus support · Issue #23 · plab...

 1 month ago
source link: https://github.com/plabayo/rama/issues/23
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

add open-telemetry middleware and extended prometheus support #23

GlenDC opened this issue Dec 17, 2023 · 4 comments

Comments

Member

E.g. keep a histogram with prometheus or another metrics system of what your poll times look like in prod

Member

Author

Service has been added to expose metrics. Now ... what metrics might be useful to be added? Should we add something similar to the tracing layer?

Member

Author

The service is there, available at https://github.com/plabayo/rama/blob/main/src/http/service/web/prometheus.rs. The thing is currently it only works with the Default Registry. So a first nice task for someone could be to turn that into a builder, similar to what we do for k8s healthcheck and allow it opt-in to define a registry instead.

Next to that we have to check what else we want to support out of the box with rama. We have for example already the tracing layer that allows you to add http tracing working out of the box. It's quiet a complex one as it allows a lot of customisation. I believe that one can be used as inspiration to see what we want to support for http metrics for example. And same for tcp metrics.

This is for now a low prio item so I am not looking into it. Available for others to pick up. However before you start developing it would be best if you can roughly outline in this issue as a comment that you want to pick it up and how you want to tackle it, how your vision on it is, etc. Feel free to also join our discord to discuss, but let's make sure to put aligned-on plans in this issue as well for proper historic / community tracking.

GlenDC

added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed needs input

low prio Low priority item.

labels

Feb 29, 2024

Member

Author

For someone that is thinking pick this up I think for a first version of rama I think the following could already be grate:

  1. allow the http service (exporter) to also work with non-global registries, and of course the global registry service could still be created using this more flexible builder under the hood
  2. create middleware for http, https://crates.io/crates/axum-prometheus can be used as inspiration and even easily ported. Of course feel free to modify / improve/ remove where you see fit
  3. similar to (2) one could also create something similar for L4 middleware, which can provide support for opt-in Extensions such as the BytesRWTracker etc

If you want to pick this up do let it be known here or on Discord. Also do not feel obliged to do all 3 bullet points, doing already 1 is perfectly fine as well, they can be all done independently. But if you do want to take them all or multiple, that is fine as well.

Member

Author

Change of plans:

we probably want the following crates:

both using them but also reexporting them for convenience.

GlenDC

changed the title add prometheus (or something similar) support for metrics

add open-telemetry middleware and extended prometheus support

Mar 15, 2024

GlenDC

added the mentor available A mentor is available to help you through the issue. label

Mar 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

No one assigned

Labels

enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed low prio Low priority item. mentor available A mentor is available to help you through the issue. needs input

Projects

None yet

Milestone

v0.3

Development

No branches or pull requests

1 participant

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK