/// <inheritdoc/> public void Initialize(IMetricsCollector collector) { _processorTime = collector.CreateMetric <SamplingGauge>("dotnet.cpu.processortime", "seconds", "Total processor time", includePrefix: false); _virtual = collector.CreateMetric <SamplingGauge>("dotnet.mem.virtual", "bytes", "Virtual memory for the process", includePrefix: false); _paged = collector.CreateMetric <SamplingGauge>("dotnet.mem.paged", "bytes", "Paged memory for the process", includePrefix: false); _threads = collector.CreateMetric <SamplingGauge>("dotnet.cpu.threads", "threads", "Threads for the process", includePrefix: false); }
/// <summary> /// Constructs a new instance of <see cref="ProcessMetricSource" />. /// </summary> public ProcessMetricSource(MetricSourceOptions options) : base(options) { _processorTime = AddSamplingGauge("dotnet.cpu.processortime", "seconds", "Total processor time"); _virtualMemory = AddSamplingGauge("dotnet.mem.virtual", "bytes", "Virtual memory for the process"); _pagedMemory = AddSamplingGauge("dotnet.mem.paged", "bytes", "Paged memory for the process"); _threadCount = AddSamplingGauge("dotnet.cpu.threads", "threads", "Threads for the process"); }
/// <inheritdoc/> public void Initialize(IMetricsCollector collector) { _gen0 = collector.CreateMetric <SamplingGauge>("dotnet.mem.collections.gen0", "collections", "Number of gen-0 collections", includePrefix: false); _gen1 = collector.CreateMetric <SamplingGauge>("dotnet.mem.collections.gen1", "collections", "Number of gen-1 collections", includePrefix: false); _gen2 = collector.CreateMetric <SamplingGauge>("dotnet.mem.collections.gen2", "collections", "Number of gen-2 collections", includePrefix: false); }
/// <summary> /// Constructs a new instance of <see cref="GarbageCollectorMetricSource" />. /// </summary> public GarbageCollectorMetricSource(MetricSourceOptions options) : base(options) { _gen0 = AddSamplingGauge("dotnet.mem.collections.gen0", "collections", "Number of gen-0 collections"); _gen1 = AddSamplingGauge("dotnet.mem.collections.gen1", "collections", "Number of gen-1 collections"); _gen2 = AddSamplingGauge("dotnet.mem.collections.gen2", "collections", "Number of gen-2 collections"); }