Exemplo n.º 1
0
        public static GaugeValueSource FromSerializableMetric(this GaugeMetric source)
        {
            var tags = source.Tags.FromDictionary();

            return(source.Value.HasValue
                ? new GaugeValueSource(source.Name, ConstantValue.Provider(source.Value.Value), source.Unit, tags)
                : new GaugeValueSource(source.Name, null, source.Unit, tags));
        }
Exemplo n.º 2
0
 public static GaugeValueSource ToMetricValueSource(this GaugeMetric source)
 {
     return(source.Value.HasValue
         ? new GaugeValueSource(source.Name, ConstantValue.Provider(source.Value.Value), source.Unit, source.Tags)
         : new GaugeValueSource(source.Name, null, source.Unit, source.Tags));
 }