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)
28private readonly ConcurrentDictionary<Instrument, InstrumentState> _instrumentStates = new(); 37private readonly Action<Instrument, LabeledAggregationStatistics, InstrumentState?> _collectMeasurement; 40private readonly Action<Instrument, InstrumentState> _beginInstrumentMeasurements; 41private readonly Action<Instrument, InstrumentState> _endInstrumentMeasurements; 42private readonly Action<Instrument, InstrumentState?> _instrumentPublished; 55Action<Instrument, LabeledAggregationStatistics, InstrumentState?> collectMeasurement, 58Action<Instrument, InstrumentState> beginInstrumentMeasurements, 59Action<Instrument, InstrumentState> endInstrumentMeasurements, 60Action<Instrument, InstrumentState?> instrumentPublished, 85_listener.SetMeasurementEventCallback<double>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 86_listener.SetMeasurementEventCallback<float>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 87_listener.SetMeasurementEventCallback<long>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 88_listener.SetMeasurementEventCallback<int>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 89_listener.SetMeasurementEventCallback<short>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 90_listener.SetMeasurementEventCallback<byte>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 91_listener.SetMeasurementEventCallback<decimal>((i, m, l, c) => ((InstrumentState)c!).Update((double)m, l)); 138_endInstrumentMeasurements(instrument, (InstrumentState)cookie); 144InstrumentState? state = GetInstrumentState(instrument); 327private InstrumentState? GetInstrumentState(Instrument instrument) 329if (!_instrumentStates.TryGetValue(instrument, out InstrumentState? instrumentState)) 356internal InstrumentState? BuildInstrumentState(Instrument instrument) 365return (InstrumentState)Activator.CreateInstance(instrumentStateType, createAggregatorFunc)!; 501foreach (KeyValuePair<Instrument, InstrumentState> kv in _instrumentStates)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
700private static void TransmitMetricValue(Instrument instrument, LabeledAggregationStatistics stats, string sessionId, InstrumentState? instrumentState)