1 type derived from InstrumentState
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\InstrumentState.cs (1)
22internal sealed class InstrumentState<TAggregator> : InstrumentState
24 references to InstrumentState
System.Diagnostics.DiagnosticSource (24)
System\Diagnostics\Metrics\AggregationManager.cs (23)
29private readonly ConcurrentDictionary<Instrument, InstrumentState> _instrumentStates = new(); 35private readonly Action<Instrument, LabeledAggregationStatistics, InstrumentState?> _collectMeasurement; 38private readonly Action<Instrument, InstrumentState> _beginInstrumentMeasurements; 39private readonly Action<Instrument, InstrumentState> _endInstrumentMeasurements; 40private readonly Action<Instrument, InstrumentState?> _instrumentPublished; 50Action<Instrument, LabeledAggregationStatistics, InstrumentState?> collectMeasurement, 53Action<Instrument, InstrumentState> beginInstrumentMeasurements, 54Action<Instrument, InstrumentState> endInstrumentMeasurements, 55Action<Instrument, InstrumentState?> instrumentPublished, 80_listener.SetMeasurementEventCallback<double>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 81_listener.SetMeasurementEventCallback<float>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 82_listener.SetMeasurementEventCallback<long>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 83_listener.SetMeasurementEventCallback<int>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 84_listener.SetMeasurementEventCallback<short>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 85_listener.SetMeasurementEventCallback<byte>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 86_listener.SetMeasurementEventCallback<decimal>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 133_endInstrumentMeasurements(instrument, (InstrumentState)cookie); 139InstrumentState? state = GetInstrumentState(instrument); 265private InstrumentState? GetInstrumentState(Instrument instrument) 267if (!_instrumentStates.TryGetValue(instrument, out InstrumentState? instrumentState)) 294internal InstrumentState? BuildInstrumentState(Instrument instrument) 303return (InstrumentState)Activator.CreateInstance(instrumentStateType, createAggregatorFunc)!; 439foreach (KeyValuePair<Instrument, InstrumentState> kv in _instrumentStates)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
698private static void TransmitMetricValue(Instrument instrument, LabeledAggregationStatistics stats, string sessionId, InstrumentState? instrumentState)