Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 3.67 KB

dotnet.md

File metadata and controls

85 lines (60 loc) · 3.67 KB

dotnet

Monitor Type: dotnet (Source)

Accepts Endpoints: No

Multiple Instances Allowed: No

Overview

(Windows Only) This monitor reports metrics for .NET applications.

The most critical .NET performance counters

  • exceptions
  • logical threads
  • physical threads
  • heap bytes
  • time in GC
  • committed bytes
  • pinned objects

Windows Performance Counters

The underlying source for these metrics are Windows Performance Counters. Most of the performance counters that we query in this monitor are actually Gauges that represent rates per second and percentages.

This monitor reports the instantaneous values for these Windows Performance Counters. This means that in between a collection interval, spikes could occur on the Performance Counters. The best way to mitigate this limitation is to increase the reporting interval on this monitor to collect more frequently.

Sample YAML configuration:

monitors:
 - type: dotnet

Configuration

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: dotnet
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
counterRefreshInterval no int64 (Windows Only) Number of seconds that wildcards in counter paths should be expanded and how often to refresh counters from configuration. (default: 60s)
printValid no bool (Windows Only) Print out the configurations that match available performance counters. This used for debugging. (default: false)

Metrics

These are the metrics available for this monitor. This monitor emits all metrics by default; however, none are categorized as container/host -- they are all custom.

  • net_clr_exceptions.num_exceps_thrown_sec (gauge)
    The number of exceptions thrown by .NET applications.
  • net_clr_locksandthreads.contention_rate_sec (gauge)
    The rate of thread of thread contention per second for .NET applications.
  • net_clr_locksandthreads.current_queue_length (gauge)
    The current thread queue length for .NET applications.
  • net_clr_locksandthreads.num_of_current_logical_threads (gauge)
    The number of current logical threads for .NET applications.
  • net_clr_locksandthreads.num_of_current_physical_threads (gauge)
    The number of current physical threads for .NET applications.
  • net_clr_memory.num_bytes_in_all_heaps (gauge)
    The number of bytes in all heaps for .NET applications.
  • net_clr_memory.num_gc_handles (gauge)
    The number of garbage collection handles held by .NET applications.
  • net_clr_memory.num_of_pinned_objects (gauge)
    The number of objects pinned in memory by .NET applications.
  • net_clr_memory.num_total_committed_bytes (gauge)
    The total number of bytes committed to memory by .NET applications.
  • net_clr_memory.num_total_reserved_bytes (gauge)
    The total number of bytes reserved by .NET applications.
  • net_clr_memory.pct_time_in_gc (gauge)
    The percentage of time spent garbage collecting by .NET applications. The agent does not do any built-in filtering of metrics coming out of this monitor.