public override BoundMeasureMetric <T> Bind(LabelSet labelset) { if (!_measureBoundInstruments.TryGetValue(labelset, out var boundInstrument)) { boundInstrument = CreateMetric(); _measureBoundInstruments.Add(labelset, boundInstrument); } return(boundInstrument); }
public override void Observe(double value, LabelSet labelset) { if (!_observerHandles.TryGetValue(labelset, out var boundInstrument)) { boundInstrument = new DoubleObserverMetricHandleSdk(); // TODO cleanup of handle/aggregator. Issue #530 _observerHandles.Add(labelset, boundInstrument); } boundInstrument.Observe(value); }
/// <inheritdoc/> public override void Observe(long value, LabelSet labelset) { }
/// <summary> /// Gets the bound measure metric with given labelset. /// </summary> /// <param name="labelset">The labelset from which bound instrument should be constructed.</param> /// <returns>The bound measure metric.</returns> public abstract BoundMeasureMetric <T> Bind(LabelSet labelset);
/// <summary> /// Observes a value. /// </summary> /// <param name="value">value to observe.</param> /// <param name="labelset">The labelset associated with this value.</param> public abstract void Observe(double value, LabelSet labelset);
/// <summary> /// Observes a value. /// </summary> /// <param name="value">value to observe.</param> /// <param name="labelset">The labelset associated with this value.</param> public abstract void Observe(long value, LabelSet labelset);