Skip to content

Latest commit

 

History

History
252 lines (199 loc) · 6.3 KB

in-process-features-configuration.md

File metadata and controls

252 lines (199 loc) · 6.3 KB

Was this documentation helpful? Share feedback

In-Process Features Configuration

First Available: 8.0 Preview 7

Some features of dotnet monitor require loading libraries into target applications. These libraries ship with dotnet monitor and are provisioned to be available to target applications using the DefaultSharedPath option in the storage configuration section. The following features require these in-process libraries to be used:

Because these libraries are loaded into the target application (they are not loaded into dotnet monitor), they may have performance impact on memory and CPU utilization in the target application. These features are off by default and may be enabled via the InProcessFeatures configuration section.

Example

To enable all available in-process features, use the following configuration:

JSON
{
  "InProcessFeatures": {
    "Enabled": true
  }
}
Kubernetes ConfigMap
InProcessFeatures__Enabled: "true"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__Enabled
  value: "true"

Call Stacks

The call stacks feature is individually enabled by setting the Enabled property of the CallStacks section to true:

JSON
{
  "InProcessFeatures": {
    "CallStacks": {
      "Enabled": true
    }
  }
}
Kubernetes ConfigMap
InProcessFeatures__CallStacks__Enabled: "true"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__CallStacks__Enabled
  value: "true"

Similarly, the call stacks feature can be individually disabled by setting the same property to false:

JSON
{
  "InProcessFeatures": {
    "Enabled": true,
    "CallStacks": {
      "Enabled": false
    }
  }
}
Kubernetes ConfigMap
InProcessFeatures__Enabled: "true"
InProcessFeatures__CallStacks__Enabled: "false"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__Enabled
  value: "true"
- name: DotnetMonitor_InProcessFeatures__CallStacks__Enabled
  value: "false"

Exceptions History

The exceptions history feature is individually enabled by setting the Enabled property of the Exceptions section to true:

JSON
{
  "InProcessFeatures": {
    "Exceptions": {
      "Enabled": true
    }
  }
}
Kubernetes ConfigMap
InProcessFeatures__Exceptions__Enabled: "true"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__Exceptions__Enabled
  value: "true"

Similarly, the exceptions history feature can be individually disabled by setting the same property to false:

JSON
{
  "InProcessFeatures": {
    "Enabled": true,
    "Exceptions": {
      "Enabled": false
    }
  }
}
Kubernetes ConfigMap
InProcessFeatures__Enabled: "true"
InProcessFeatures__Exceptions__Enabled: "false"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__Enabled
  value: "true"
- name: DotnetMonitor_InProcessFeatures__Exceptions__Enabled
  value: "false"

Filtering

Which exceptions are collected and stored can be filtered via configuration using ExceptionsConfiguration. This can be useful for noisy exceptions that are not useful to capture - an example of this may be disregarding any TaskCanceledException that the target application produces.

Note that this is different than real-time filtering, which does not restrict the collection of exceptions and is solely responsible for determining which exceptions are displayed when using the /exceptions route.

In this example, a user is choosing to only collect exceptions where the top frame's class is MyClassName, and exceptions of types TaskCanceledException or OperationCanceledException will not be collected.

JSON
{
  "InProcessFeatures": {
    "Exceptions": {
      "Enabled": true,
      "CollectionFilters": {
        "Include": [
          {
            "TypeName": "MyClassName"
          }
        ],
        "Exclude": [
          {
            "ExceptionType": "TaskCanceledException"
          },
          {
            "ExceptionType": "OperationCanceledException"
          }
        ]
      }
    }
  }
}
Kubernetes ConfigMap
InProcessFeatures__Exceptions__Enabled: "true"
InProcessFeatures__Exceptions__CollectionFilters__Include__0__TypeName: "MyClassName"
InProcessFeatures__Exceptions__CollectionFilters__Exclude__0__ExceptionType: "TaskCanceledException"
InProcessFeatures__Exceptions__CollectionFilters__Exclude__1__ExceptionType: "OperationCanceledException"
Kubernetes Environment Variables
- name: DotnetMonitor_InProcessFeatures__Exceptions__Enabled
  value: "true"
- name: DotnetMonitor_InProcessFeatures__Exceptions__CollectionFilters__Include__0__TypeName
  value: "MyClassName"
- name: DotnetMonitor_InProcessFeatures__Exceptions__CollectionFilters__Exclude__0__ExceptionType
  value: "TaskCanceledException"
- name: DotnetMonitor_InProcessFeatures__Exceptions__CollectionFilters__Exclude__1__ExceptionType
  value: "OperationCanceledException"