Ejemplo n.º 1
0
 internal Histogram(Meter meter, string name, string?unit, string?description) : base(meter, name, unit, description)
 {
     Publish();
 }
Ejemplo n.º 2
0
 internal ObservableGauge(Meter meter, string name, Func <T> observeValue !!, string?unit, string?description) : base(meter, name, unit, description)
Ejemplo n.º 3
0
 /// <summary>
 /// Create the metrics instrument using the properties meter, name, description, and unit.
 /// All classes extending Instrument{T} need to call this constructor when constructing object of the extended class.
 /// </summary>
 /// <param name="meter">The meter that created the instrument.</param>
 /// <param name="name">The instrument name. cannot be null.</param>
 /// <param name="unit">Optional instrument unit of measurements.</param>
 /// <param name="description">Optional instrument description.</param>
 protected Instrument(Meter meter, string name, string?unit, string?description) : base(meter, name, unit, description)
 {
     ValidateTypeParameter <T>();
 }
Ejemplo n.º 4
0
 internal Counter(Meter meter, string name, string?unit, string?description) : base(meter, name, unit, description)
 {
     Publish();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Publish is activating the instrument to start recording measurements and to allow listeners to start listening to such measurements.
 /// </summary>
 protected void Publish()
 {
     Meter.AddInstrument(this);
     MeterListener.NotifyForPublishedInstrument(this);
 }