@@ -66,7 +66,8 @@ void AddHistogramView(opentelemetry::sdk::metrics::MeterProvider& provider,
6666// These are useful on Windows with DLLs and mixed CRTs, and we should try to
6767// them if they are available.
6868#if OPENTELEMETRY_VERSION_MAJOR > 1 || \
69- (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 10 )
69+ (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 23 )
70+ (void )unit;
7071 provider.AddView (
7172 opentelemetry::sdk::metrics::InstrumentSelectorFactory::Create (
7273 opentelemetry::sdk::metrics::InstrumentType::kHistogram , name, unit),
@@ -76,6 +77,17 @@ void AddHistogramView(opentelemetry::sdk::metrics::MeterProvider& provider,
7677 name, std::move (description),
7778 opentelemetry::sdk::metrics::AggregationType::kHistogram ,
7879 std::move (aggregation_config)));
80+ #elif OPENTELEMETRY_VERSION_MAJOR > 1 || \
81+ (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 10 )
82+ provider.AddView (
83+ opentelemetry::sdk::metrics::InstrumentSelectorFactory::Create (
84+ opentelemetry::sdk::metrics::InstrumentType::kHistogram , name, unit),
85+ opentelemetry::sdk::metrics::MeterSelectorFactory::Create (
86+ kGrpcMeterName , grpc::Version (), kGrpcSchema ),
87+ opentelemetry::sdk::metrics::ViewFactory::Create (
88+ name, std::move (description), unit,
89+ opentelemetry::sdk::metrics::AggregationType::kHistogram ,
90+ std::move (aggregation_config)));
7991#else
8092 (void )unit;
8193 provider.AddView (
0 commit comments