示例#1
0
 internal Histogram(Meter meter, string name, string?unit, string?description) : base(meter, name, unit, description)
 {
     Publish();
 }
示例#2
0
 internal ObservableGauge(Meter meter, string name, Func <T> observeValue !!, string?unit, string?description) : base(meter, name, unit, description)
示例#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>();
 }
示例#4
0
 internal Counter(Meter meter, string name, string?unit, string?description) : base(meter, name, unit, description)
 {
     Publish();
 }
示例#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);
 }