Skip to content

Commit 81caf2f

Browse files
committed
Add some doc comments
1 parent 8fab245 commit 81caf2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core-api/src/telemetry/metrics.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ use std::{borrow::Cow, collections::HashSet, fmt::Debug, sync::Arc};
44
/// The implementor is responsible for the allocation/instantiation of new metric meters which
55
/// Core has requested.
66
pub trait CoreMeter: Send + Sync + Debug {
7+
/// Given some k/v pairs, create a return a new instantiated instance of metric attributes.
8+
/// Only [MetricAttributes] created by this meter can be used when calling record on instruments
9+
/// created by this meter.
710
fn new_attributes(&self, attribs: NewAttributes) -> MetricAttributes;
11+
/// Extend some existing attributes with new values. Implementations should create new instances
12+
/// when doing so, rather than mutating whatever is backing the passed in `existing` attributes.
813
fn extend_attributes(
914
&self,
1015
existing: MetricAttributes,

0 commit comments

Comments
 (0)