wcy-fdu commented on PR #1930: URL: https://github.com/apache/incubator-opendal/pull/1930#issuecomment-1507942273
> I am not an expert on Prometheus, but according to the document at https://prometheus.io/docs/practices/naming/#labels, it is recommended not to include labels in metric names. > > > * For duration, I think exponential bucket can also meet requirements, as the span will not be too large > > (At most, it is the latency difference between accessing memory and accessing remote storage). > > Based on current API: > > ```rust > let opts = histogram_opts!( > "bytes_total_blocking_write", > "total size by blocking_write", > exponential_buckets(0.01, 2.0, 16).unwrap() > ); > let bytes_total_blocking_write = > register_histogram_vec_with_registry!(opts, &["scheme", "operation"], registry) > .unwrap(); > ``` > > I thought we can use different histogram bucket for different labels? Thanks for suggestion! Fixed, and it looks much clearer: ``` requests_total{operation="read",scheme="memory"} 1 requests_total{operation="stat",scheme="memory"} 1 requests_total{operation="write",scheme="memory"} 1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
