@@ -58,8 +58,8 @@ void InitMetrics(std::string &name)
58
58
auto provider = metric_sdk::MeterProviderFactory::Create (std::move (context));
59
59
60
60
// histogram view
61
- std::string histogram_name = name + " _histogram " ;
62
- std::string unit = " unit" ;
61
+ std::string histogram_name = name + " _exponential_histogram " ;
62
+ std::string unit = " histogram- unit" ;
63
63
64
64
auto histogram_instrument_selector = metric_sdk::InstrumentSelectorFactory::Create (
65
65
metric_sdk::InstrumentType::kHistogram , histogram_name, unit);
@@ -79,7 +79,7 @@ void InitMetrics(std::string &name)
79
79
std::move (histogram_aggregation_config));
80
80
81
81
auto histogram_view = metric_sdk::ViewFactory::Create (
82
- name, " description " , unit, metric_sdk::AggregationType::kBase2ExponentialHistogram ,
82
+ name, " des " , unit, metric_sdk::AggregationType::kBase2ExponentialHistogram ,
83
83
aggregation_config);
84
84
85
85
provider->AddView (std::move (histogram_instrument_selector), std::move (histogram_meter_selector),
@@ -151,13 +151,15 @@ int main(int argc, char *argv[])
151
151
std::thread counter_example{&foo_library::counter_example, name};
152
152
std::thread observable_counter_example{&foo_library::observable_counter_example, name};
153
153
std::thread histogram_example{&foo_library::histogram_example, name};
154
+ std::thread histogram_exp_example{&foo_library::histogram_exp_example, name};
154
155
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
155
156
std::thread gauge_example{&foo_library::gauge_example, name};
156
157
#endif
157
158
158
- // counter_example.join();
159
- // observable_counter_example.join();
159
+ counter_example.join ();
160
+ observable_counter_example.join ();
160
161
histogram_example.join ();
162
+ histogram_exp_example.join ();
161
163
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
162
164
gauge_example.join ();
163
165
#endif
0 commit comments