Skip to content

Commit 5c842a8

Browse files
committed
fix stdout for histogram
1 parent 89e2a64 commit 5c842a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-stdout/src/metrics/transform.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl<T: Into<DataValue> + Copy> From<&data::Histogram<T>> for Histogram {
284284
#[derive(Serialize, Debug, Clone)]
285285
#[serde(rename_all = "camelCase")]
286286
struct HistogramDataPoint {
287-
attributes: AttributeSet,
287+
attributes: Vec<KeyValue>,
288288
#[serde(serialize_with = "as_unix_nano")]
289289
start_time_unix_nano: SystemTime,
290290
#[serde(serialize_with = "as_unix_nano")]
@@ -306,7 +306,7 @@ struct HistogramDataPoint {
306306
impl<T: Into<DataValue> + Copy> From<&data::HistogramDataPoint<T>> for HistogramDataPoint {
307307
fn from(value: &data::HistogramDataPoint<T>) -> Self {
308308
HistogramDataPoint {
309-
attributes: AttributeSet::from(&value.attributes),
309+
attributes: value.attributes.iter().map(Into::into).collect(),
310310
start_time_unix_nano: value.start_time,
311311
time_unix_nano: value.time,
312312
start_time: value.start_time,

0 commit comments

Comments
 (0)