36 Log.Error(
"",
"System.Diagnostics.Metrics EventSource not supported on browser");
50 Log.Message(
"Previous session with id " +
_sessionId +
" is stopped");
66 Log.Message(
"New session started. SessionId auto-generated: " +
_sessionId);
72 Log.Message(
"RefreshInterval argument received: " +
value2);
75 Log.Message(
$"Failed to parse RefreshInterval. Using default {num}s.");
78 else if (result < 0.1)
80 Log.Message(
$"RefreshInterval too small. Using minimum interval {0.1} seconds.");
86 Log.Message(
$"No RefreshInterval argument received. Using default {num}s.");
93 Log.Message(
"MaxTimeSeries argument received: " +
value3);
96 Log.Message(
$"Failed to parse MaxTimeSeries. Using default {num2}");
102 Log.Message(
$"No MaxTimeSeries argument received. Using default {num2}");
109 Log.Message(
"MaxHistograms argument received: " +
value4);
112 Log.Message(
$"Failed to parse MaxHistograms. Using default {num3}");
118 Log.Message(
$"No MaxHistogram argument received. Using default {num3}");
133 Log.BeginInstrumentReporting(
sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description);
136 Log.EndInstrumentReporting(
sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description);
139 Log.InstrumentPublished(
sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description);
159 Log.Message(
"Metrics argument received: " +
value5);
164 Log.Message(
"No Metrics argument received");
192 Log.Message(
"Failed to parse metric spec: {specString}");
195 Log.Message(
"Parsed metric: {spec}");
196 if (
spec.InstrumentName !=
null)
226 for (
int i = 0; i <
labels.Length; i++)
229 if (i !=
labels.Length - 1)
240 for (
int i = 0; i <
quantiles.Length; i++)
266 int num =
text.IndexOf(
'\\');
304 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
311 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
318 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
325 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
332 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
339 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
346 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
365 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"This calls WriteEvent with all primitive arguments which is safe. Primitives are always serialized properly.")]
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
AggregationManager SetCollectionPeriod(TimeSpan collectionPeriod)
void Include(string meterName)
string FormatTags(KeyValuePair< string, string >[] labels)
void ParseSpecs(string metricsSpecs)
bool LogError(Exception e)
void TransmitMetricValue(Instrument instrument, LabeledAggregationStatistics stats, string sessionId)
static readonly char[] s_instrumentSeperators
AggregationManager _aggregationManager
void OnEventCommand(EventCommandEventArgs command)
string FormatQuantiles(QuantileValue[] quantiles)
const EventKeywords Messages
const EventKeywords InstrumentPublishing
const EventKeywords TimeSeriesValues
override string ToString()
MetricSpec(string meterName, string instrumentName)
static bool TryParse(string text, out MetricSpec spec)
override void OnEventCommand(EventCommandEventArgs command)
void CollectionStop(string sessionId, DateTime intervalStartTime, DateTime intervalEndTime)
void MultipleSessionsNotSupportedError(string runningSessionId)
void Error(string sessionId, string errorMessage)
void GaugeValuePublished(string sessionId, string meterName, string meterVersion, string instrumentName, string unit, string tags, string lastValue)
void Message(string Message)
void BeginInstrumentReporting(string sessionId, string meterName, string meterVersion, string instrumentName, string instrumentType, string unit, string description)
static readonly MetricsEventSource Log
void CollectionStart(string sessionId, DateTime intervalStartTime, DateTime intervalEndTime)
void InitialInstrumentEnumerationComplete(string sessionId)
void ObservableInstrumentCallbackError(string sessionId, string errorMessage)
void InstrumentPublished(string sessionId, string meterName, string meterVersion, string instrumentName, string instrumentType, string unit, string description)
void EndInstrumentReporting(string sessionId, string meterName, string meterVersion, string instrumentName, string instrumentType, string unit, string description)
void TimeSeriesLimitReached(string sessionId)
void CounterRateValuePublished(string sessionId, string meterName, string meterVersion, string instrumentName, string unit, string tags, string rate)
void HistogramValuePublished(string sessionId, string meterName, string meterVersion, string instrumentName, string unit, string tags, string quantiles)
void HistogramLimitReached(string sessionId)
unsafe void WriteEvent(int eventId)
override string ToString()
static CultureInfo InvariantCulture
static TimeSpan FromSeconds(double value)