File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## Unreleased
8+
9+ ### Added
10+
11+ - Added ` encoding::text::encode_descriptor ` and ` encoding::text::encode_metric `
12+ for custom registries that need to compose descriptors, samples and EOF
13+ markers independently.
14+ - Added ` EncodeMetric ` forwarding for ` Arc<T: EncodeMetric> ` .
15+
716## [ 0.24.1]
817
918### Added
Original file line number Diff line number Diff line change @@ -71,6 +71,24 @@ impl EncodeMetric for Box<dyn EncodeMetric> {
7171 fn metric_type ( & self ) -> MetricType {
7272 self . deref ( ) . metric_type ( )
7373 }
74+
75+ fn is_empty ( & self ) -> bool {
76+ self . deref ( ) . is_empty ( )
77+ }
78+ }
79+
80+ impl < T : EncodeMetric + ?Sized > EncodeMetric for Arc < T > {
81+ fn encode ( & self , encoder : MetricEncoder ) -> Result < ( ) , std:: fmt:: Error > {
82+ self . deref ( ) . encode ( encoder)
83+ }
84+
85+ fn metric_type ( & self ) -> MetricType {
86+ self . deref ( ) . metric_type ( )
87+ }
88+
89+ fn is_empty ( & self ) -> bool {
90+ self . deref ( ) . is_empty ( )
91+ }
7492}
7593
7694/// Encoder for a Metric Descriptor.
You can’t perform that action at this time.
0 commit comments