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)
29
private readonly ConcurrentDictionary<Instrument,
InstrumentState
> _instrumentStates = new();
35
private readonly Action<Instrument, LabeledAggregationStatistics,
InstrumentState
?> _collectMeasurement;
38
private readonly Action<Instrument,
InstrumentState
> _beginInstrumentMeasurements;
39
private readonly Action<Instrument,
InstrumentState
> _endInstrumentMeasurements;
40
private readonly Action<Instrument,
InstrumentState
?> _instrumentPublished;
50
Action<Instrument, LabeledAggregationStatistics,
InstrumentState
?> collectMeasurement,
53
Action<Instrument,
InstrumentState
> beginInstrumentMeasurements,
54
Action<Instrument,
InstrumentState
> endInstrumentMeasurements,
55
Action<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);
139
InstrumentState
? state = GetInstrumentState(instrument);
265
private
InstrumentState
? GetInstrumentState(Instrument instrument)
267
if (!_instrumentStates.TryGetValue(instrument, out
InstrumentState
? instrumentState))
294
internal
InstrumentState
? BuildInstrumentState(Instrument instrument)
303
return (
InstrumentState
)Activator.CreateInstance(instrumentStateType, createAggregatorFunc)!;
439
foreach (KeyValuePair<Instrument,
InstrumentState
> kv in _instrumentStates)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
698
private static void TransmitMetricValue(Instrument instrument, LabeledAggregationStatistics stats, string sessionId,
InstrumentState
? instrumentState)