Skip to content

Commit ee3ddfb

Browse files
committed
fix stdout exporter
1 parent 715e7ff commit ee3ddfb

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
@@ -230,7 +230,7 @@ impl<T: Into<DataValue> + Copy> From<&data::Sum<T>> for Sum {
230230
#[derive(Serialize, Debug, Clone)]
231231
#[serde(rename_all = "camelCase")]
232232
struct DataPoint {
233-
attributes: AttributeSet,
233+
attributes: Vec<KeyValue>,
234234
#[serde(serialize_with = "as_opt_human_readable")]
235235
start_time: Option<SystemTime>,
236236
#[serde(serialize_with = "as_opt_human_readable")]
@@ -253,7 +253,7 @@ fn is_zero_u8(v: &u8) -> bool {
253253
impl<T: Into<DataValue> + Copy> From<&data::DataPoint<T>> for DataPoint {
254254
fn from(value: &data::DataPoint<T>) -> Self {
255255
DataPoint {
256-
attributes: AttributeSet::from(&value.attributes),
256+
attributes: value.attributes.iter().map(Into::into).collect(),
257257
start_time_unix_nano: value.start_time,
258258
time_unix_nano: value.time,
259259
start_time: value.start_time,

0 commit comments

Comments
 (0)