1 type derived from InstrumentState
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\InstrumentState.cs (1)
22
internal sealed class InstrumentState<TAggregator> :
InstrumentState
24 references to InstrumentState
System.Diagnostics.DiagnosticSource (24)
System\Diagnostics\Metrics\AggregationManager.cs (23)
28
private readonly ConcurrentDictionary<Instrument,
InstrumentState
> _instrumentStates = new();
37
private readonly Action<Instrument, LabeledAggregationStatistics,
InstrumentState
?> _collectMeasurement;
40
private readonly Action<Instrument,
InstrumentState
> _beginInstrumentMeasurements;
41
private readonly Action<Instrument,
InstrumentState
> _endInstrumentMeasurements;
42
private readonly Action<Instrument,
InstrumentState
?> _instrumentPublished;
55
Action<Instrument, LabeledAggregationStatistics,
InstrumentState
?> collectMeasurement,
58
Action<Instrument,
InstrumentState
> beginInstrumentMeasurements,
59
Action<Instrument,
InstrumentState
> endInstrumentMeasurements,
60
Action<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);
144
InstrumentState
? state = GetInstrumentState(instrument);
327
private
InstrumentState
? GetInstrumentState(Instrument instrument)
329
if (!_instrumentStates.TryGetValue(instrument, out
InstrumentState
? instrumentState))
356
internal
InstrumentState
? BuildInstrumentState(Instrument instrument)
365
return (
InstrumentState
)Activator.CreateInstance(instrumentStateType, createAggregatorFunc)!;
501
foreach (KeyValuePair<Instrument,
InstrumentState
> kv in _instrumentStates)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
700
private static void TransmitMetricValue(Instrument instrument, LabeledAggregationStatistics stats, string sessionId,
InstrumentState
? instrumentState)