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