-
Hi, Is it possible to have CreateDoubleHistogram with no bucket and just use the min and max collected by this Instrument. This would be useful for capturing quickly changing metric values and seeing any extreme values above or below the mean or last value. Currently am using a gauge, but this only uses the last value as I understand it. |
Beta Was this translation helpful? Give feedback.
Answered by
malkia
Dec 31, 2024
Replies: 1 comment 1 reply
-
You can add a view, for example: {
using namespace opentelemetry::sdk::metrics;
auto aggr_conf = std::make_unique<HistogramAggregationConfig>();
aggr_conf->boundaries_ = std::vector<double>{0.0f};
aggr_conf->record_min_max_ = false;
provider->AddView(
InstrumentSelectorFactory::Create(InstrumentType::kHistogram, "*", ""),
MeterSelectorFactory::Create("", "", ""),
ViewFactory::Create( "", "", "", AggregationType::kHistogram, std::move( aggr_conf ) )
);
} This creates only two buckets - 0.0, and inf+ |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ashley-b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add a view, for example:
This creates only two buckets - 0.0, and inf+