File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,14 @@ MetricCollector::MetricCollector(opentelemetry::sdk::metrics::MeterContext *cont
3535AggregationTemporality MetricCollector::GetAggregationTemporality (
3636 InstrumentType instrument_type) noexcept
3737{
38- return metric_reader_->GetAggregationTemporality (instrument_type);
38+ auto aggregation_temporality = metric_reader_->GetAggregationTemporality (instrument_type);
39+ if (aggregation_temporality == AggregationTemporality::kDelta && instrument_type == InstrumentType::kGauge ) {
40+ OTEL_INTERNAL_LOG_ERROR (" [MetricCollector::GetAggregationTemporality] - Error getting aggregation temporality."
41+ << " Delta temporality for Synchronous Gauge is currently not supported, using cumulative temporality" );
42+
43+ return AggregationTemporality::kCumulative ;
44+ }
45+ return aggregation_temporality;
3946}
4047
4148bool MetricCollector::Collect (
You can’t perform that action at this time.
0 commit comments