Skip to content

Commit

Permalink
Stdout to print temporality in user readable format (open-telemetry#1260
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cijothomas authored Sep 9, 2023
1 parent 52dd8d3 commit c36db50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions opentelemetry-stdout/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- Timestamp is additionally exported in user-friendly format.
[#1192](https://github.com/open-telemetry/opentelemetry-rust/pull/1192).
- MetricExporter - Temporality is exported in user-friendly format.
[#1260](https://github.com/open-telemetry/opentelemetry-rust/pull/1260).

## v0.1.0

Expand Down
6 changes: 5 additions & 1 deletion opentelemetry-stdout/src/metrics/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ impl Serialize for Temporality {
where
S: Serializer,
{
serializer.serialize_u8(*self as u32 as u8)
match &self {
Temporality::Cumulative => serializer.serialize_str("Cumulative"),
Temporality::Delta => serializer.serialize_str("Delta"),
Temporality::Unspecified => serializer.serialize_str("Unspecified"),
}
}
}

Expand Down

0 comments on commit c36db50

Please sign in to comment.