opentelemetry-rust
opentelemetry-rust copied to clipboard
Provide API to customize bucket boundaries for individual value recorders
Hi,
Currently it's only possible to customize histogram boundaries globally through ExporterBuilder::with_default_histogram_boundaries.
It would be great if customizing the boundaries for each specific value recorder was supported.
Something along the following lines
let recorder = global::meter("my_meter")
.f64_value_recorder("my_recorder")
.with_boundaries(vec![10.0, 50.0, 200.0]) // <-- not possible right now
.init();
Would a contribution be welcome? Is there a workaround to obtain the same behavior (maybe through multiple exporters?)
It looks like this will be supported in the future via the AggregatorSelector, maybe you can clarify here @TommyCpp?
Since the metrics spec has been stabilized. We are looking to migrate the existing implementation onto the stable spec. In the stable metric spec. This can be achieved via Histogram instrument and Histogram aggregation where you can configure your boundaries.
@TommyCpp Is there a tracking issue for migration onto the stable spec? I'm trying to figure out how to set custom buckets for a specific histogram in current (0.16) version and it's not entirely clear, I might be missing something though
@Alexx-G I am working on creating some issue to lay out our road map on metrics. It will take some time to implement it. So if many users need those we may explore and see if we can provide some kind of API based on current version.
Per the spec this should be customized in the SDK based upon the Views
So if many users need those we may explore and see if we can provide some kind of API based on current version.
Is this simply not possible currently with opentelemetry-rust?
#897 has been released in #1156