Skip to content

Commit

Permalink
Add link to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
twenzel committed Mar 10, 2022
1 parent b257fbf commit dcdd6ee
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public RuntimeMetrics(RuntimeMetricsOptions options)
if (options.IsProcessEnabled)
{
this.meter.CreateObservableCounter("process.cpu.time", this.GetProcessorTimes, "s", "Processor time of this process");

// Not yet official: https://github.com/open-telemetry/opentelemetry-specification/pull/2392
this.meter.CreateObservableGauge("process.cpu.count", () => Environment.ProcessorCount, description: "The number of available logical CPUs");
this.meter.CreateObservableGauge("process.memory.usage", () => Process.GetCurrentProcess().WorkingSet64, "By", "The amount of physical memory in use");
this.meter.CreateObservableGauge("process.memory.virtual", () => Process.GetCurrentProcess().VirtualMemorySize64, "By", "The amount of committed virtual memory");
Expand Down

0 comments on commit dcdd6ee

Please sign in to comment.