Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 3.73 KB

File metadata and controls

50 lines (33 loc) · 3.73 KB

Configuration

dotnet monitor has extensive configuration to control various aspects of its behavior. Ordinarily, you are not required to specify most of this configuration and only exists if you wish to change the default behavior in dotnet monitor.

Note

Some features are experimental and are denoted as **[Experimental]** in these documents.

Configuration Reference

  • Configuration Sources - How to use JSON configuration files, Environment variables or Kubernetes for configuration
  • Configuration Schema - How to get schema completion in supported editors
  • View Merged Configuration - How to use a diagnostic command to show the merged configuration that will be applied
  • Diagnostic Port Configuration - dotnet monitor communicates via .NET processes through their diagnostic port which can be changed if necessary
  • Kestrel Configuration - Configure how dotnet monitor listens for http requests
  • Storage Configuration Some diagnostic features (e.g. memory dumps, stack traces) require that a directory is shared between the dotnet monitor tool and the target applications. The Storage configuration section allows specifying these directories to facilitate this sharing.
  • Default Process Configuration - Used to determine which process is used for metrics and in situations where the process is not specified in the query to retrieve an artifact.
  • Metrics Configuration - Configuration of the /metrics endpoint for live metrics collection
  • Egress Configuration - When dotnet-monitor is used to produce artifacts such as dumps or traces, an egress provider enables the artifacts to be stored in a manner suitable for the hosting environment rather than streamed back directly.]
  • In-Process Features Configuration - Some features of dotnet monitor require loading libraries into target applications that may have performance impact on memory and CPU utilization
  • Garbage Collector Mode - Configure which GC mode is used by the dotnet monitor process.

Kestrel Configuration

// TODO

Cross-Origin Resource Sharing (CORS) Configuration

// TODO

Configuration Schema

dotnet monitor's various configuration knobs have been documented via JSON schema. Using a modern editor like VS or VS Code that supports JSON Schema makes it trivial to author complex configuration objects with support for completions and rich descriptions via tooltips.

To get completion support in your editor, simply add the $schema property to the root JSON object as shown below:

{
  "$schema": "https://aka.ms/dotnet-monitor-schema"
}

Once you've added the $schema property, you should have support for completions in your editor.

completions

Garbage Collector Mode

Starting in 7.0, by default dotnet monitor will use Workstation GC mode, unless running in one of the official docker images where it will use Server GC mode by default but will fallback to Workstation mode if only one logical CPU core is available.

You can learn more about the different GC modes here, and how to configure the default GC mode here.