Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public override void Observe(long value, LabelSet labelset)
 {
 }
Exemplo n.º 4
0
 /// <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);
Exemplo n.º 5
0
 /// <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);
Exemplo n.º 6
0
 /// <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);