Skip to content

Commit

Permalink
Changelog for counter type improvements (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
56quarters authored Mar 9, 2024
1 parent 63c3268 commit e7eeb94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [v1.3.0](https://github.com/56quarters/cadence/tree/1.3.0) - Unreleased
* Add support for using `u64`, `i32`, and `u32` types as counters per
[#201](https://github.com/56quarters/cadence/pull/201). Thanks to @James-Bartman
for this contribution.

## [v1.2.0](https://github.com/56quarters/cadence/tree/1.2.0) - 2024-02-20
* Add `QueuingMetricSinkBuilder` to allow an error handler to be set for
the wrapped `MetricSink` implementation per [#195](https://github.com/56quarters/cadence/pull/195).
Expand Down
2 changes: 2 additions & 0 deletions cadence/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ impl ToCounterValue for i64 {
Ok(MetricValue::Signed(self))
}
}

impl ToCounterValue for i32 {
fn try_to_value(self) -> MetricResult<MetricValue> {
Ok(MetricValue::Signed(self.into()))
Expand Down Expand Up @@ -118,6 +119,7 @@ impl ToGaugeValue for u64 {
Ok(MetricValue::Unsigned(self))
}
}

impl ToGaugeValue for f64 {
fn try_to_value(self) -> MetricResult<MetricValue> {
Ok(MetricValue::Float(self))
Expand Down

0 comments on commit e7eeb94

Please sign in to comment.