Skip to content

Commit

Permalink
Add AggregationTemporality Cumulative to OTLP histogram metric (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoparente authored Apr 17, 2023
1 parent 574c855 commit 766939f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ class Histogram final : public Metric
auto metric = scope.add_metrics();
metric->set_name(base_name_snake());
metric->set_description(_desc);
auto hist_data_point = metric->mutable_histogram()->add_data_points();
auto m_hist = metric->mutable_histogram();
m_hist->set_aggregation_temporality(metrics::v1::AggregationTemporality::AGGREGATION_TEMPORALITY_CUMULATIVE);
auto hist_data_point = m_hist->add_data_points();
hist_data_point->set_start_time_unix_nano(timespec_to_uint64(start));
hist_data_point->set_time_unix_nano(timespec_to_uint64(end));

Expand Down

0 comments on commit 766939f

Please sign in to comment.