13 internal static object SyncObject {
get; } =
new object();
18 public string Name {
get; }
22 public string?
Unit {
get; }
24 public bool Enabled => _subscriptions.First !=
null;
61 item.InstrumentPublished?.Invoke(
this,
item);
69 diagNode.Value.Listener.DisableMeasurementEvents(
this);
110 if (listener ==
diagNode.Value.Listener)
135 diagNode.Value.Listener.NotifyMeasurement(
this, measurement, tags,
diagNode.Value.State);
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
object GetSubscriptionState(MeterListener listener)
void RecordMeasurement(T measurement, in TagList tagList)
virtual bool IsObservable
Instrument(Meter meter, string name, string? unit, string? description)
void NotifyForUnpublishedInstrument()
virtual void Observe(MeterListener listener)
void RecordMeasurement(T measurement)
void RecordMeasurement(T measurement, KeyValuePair< string, object?> tag1, KeyValuePair< string, object?> tag2)
void RecordMeasurement(T measurement, ReadOnlySpan< KeyValuePair< string, object?> > tags)
object DisableMeasurements(MeterListener listener)
object EnableMeasurement(ListenerSubscription subscription, out bool oldStateStored)
static KeyValuePair< string, object?>[] EmptyTags
static void ValidateTypeParameter< T >()
readonly DiagLinkedList< ListenerSubscription > _subscriptions
void RecordMeasurement(T measurement, KeyValuePair< string, object?> tag1, KeyValuePair< string, object?> tag2, KeyValuePair< string, object?> tag3)
void RecordMeasurement(T measurement, KeyValuePair< string, object?> tag)
static List< MeterListener > GetAllListeners()
bool AddInstrument(Instrument instrument)
static string Format(string resourceFormat, object p1)
static string UnsupportedType