opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Add Prometheus Layer support so that users can use prometheus client instead

Open Xuanwo opened this issue 2 years ago • 7 comments

Xuanwo avatar Dec 30 '22 04:12 Xuanwo

can we pass a registry parameter to the prometheus layer? so it can easier to integrate with the caller's prometheus config.

flaneur2020 avatar Dec 30 '22 05:12 flaneur2020

can we pass a registry parameter to the prometheus layer? so it can easier to integrate with the caller's prometheus config.

Seems interesting.

I know little about rust-prometheus's API now so I don't know if we can. But I will take this into consideration.

Xuanwo avatar Dec 30 '22 05:12 Xuanwo

After a quick look on rust-prometheus docs, I found allowing user-input registry is required.

We will implement it. @flaneur2020

Xuanwo avatar Dec 30 '22 05:12 Xuanwo

Is this issue work in progress? RisingWave used to implement it's monitoring system 1.0 via rust-prometheus and grafana dashboard, which include some basic metrics for storage. If no one is assigned , I'd like to try it.

wcy-fdu avatar Feb 20 '23 13:02 wcy-fdu

Go ahead!

Xuanwo avatar Feb 20 '23 13:02 Xuanwo

Can you describe the requirements in detail? I saw that there are already MetricsHandler in layers, do you want users to be able to observe these metrics or add more metrics? For observation, I prefer to introduce grafana dashboard to monitor these metrics, just like Tikv or RisingWave; for more detailed metrics, may add some metrics for the basic operations on object, eg. op_latency, op_count, object_size.

wcy-fdu avatar Feb 21 '23 09:02 wcy-fdu

Can you describe the requirements in detail?

PrometheusLayer should be exactly the same with MetricsLayer, the only difference is all metrics are sent via promethues handler.

I saw that there are already MetricsHandler in layers, do you want users to be able to observe these metrics or add more metrics?

PrometheusLayer and MetricsLayer are different layers that users can enable one of them or at the same time.

For observation, I prefer to introduce grafana dashboard to monitor these metrics, just like Tikv or RisingWave;

Great! PrometheusLayer or MetricsLayer are built for this. It may be a good idea to include a grafana template json in our docs for our users to get started.

for more detailed metrics, may add some metrics for the basic operations on object, eg. op_latency, op_count, object_size.

Latency and count are already covered. And we have opendal_bytes_total for read & write, maybe that enough?

Xuanwo avatar Feb 22 '23 06:02 Xuanwo

Thanks for @wcy-fdu 's work, this issue has been implemented.

Xuanwo avatar Apr 20 '23 09:04 Xuanwo