77 -> std::shared_ptr<value_recorder>
override
79 bool in_seconds{
false };
80 if (tags.count(
"__unit") > 0) {
81 if (tags.at(
"__unit") ==
"s") {
88 std::shared_lock lock(mutex_);
90 if (
const auto it = double_histograms_.find(name); it != double_histograms_.end()) {
91 return std::make_shared<otel_value_recorder<double>>(it->second, tags);
94 if (
const auto it = uint_histograms_.find(name); it != uint_histograms_.end()) {
95 return std::make_shared<otel_value_recorder<std::uint64_t>>(it->second, tags);
103 std::scoped_lock lock(mutex_);
105 if (
const auto it = double_histograms_.find(name); it != double_histograms_.end()) {
106 return std::make_shared<otel_value_recorder<double>>(it->second, tags);
109 auto histogram = meter_->CreateDoubleHistogram(name,
"",
"s");
110 double_histograms_.emplace(name, std::move(histogram));
111 return std::make_shared<otel_value_recorder<double>>(double_histograms_.at(name), tags);
113 if (
const auto it = uint_histograms_.find(name); it != uint_histograms_.end()) {
114 return std::make_shared<otel_value_recorder<std::uint64_t>>(it->second, tags);
117 auto histogram = meter_->CreateUInt64Histogram(name);
118 uint_histograms_.emplace(name, std::move(histogram));
119 return std::make_shared<otel_value_recorder<std::uint64_t>>(uint_histograms_.at(name),