Configure Abridged Traces in APM Dotnet Agent

This feature is designed to eliminate cases of excessive span count per trace. When too many spans are created in a single call, the agent may cause a higher than desired overhead, it may also increase the hourly span count, causing a higher-than-expected charge. Cases when this may be a problem include recursive calls (intentional or not), generated code resulting in high number of SQLs executed per transaction, and others.

  • The abridge feature allows users to limit the maximum number of spans per call. It also provides a way to exclude spans that may be considered “not worthy” (For example, high volume of very quick SQLs).
  • Probe specific count limits, span name based exclusion, and thresholding are configurable per call as described in the configuration section.
  • The default setting is to limit each call to 100 spans.
  • Basic summary statistics about dropped spans can be collected per call.

Below is an example of a setting that will limit the maximum number of ODP spans per call to 50 and exclude SQLs that execute in less than 2ms. By enabling the summarize option, the agent will add the following metrics to the parent span: dropped span count, avg dropped span duration, min dropped span time, max dropped span time, dropped span error count.

OTEL_DOTNET_ABRIDGE_SUMMARIZE=true
OTEL_DOTNET_ABRIDGE_PROBE_SPAN_LIMIT_odp=50
OTEL_DOTNET_ABRIDGE_PROBE_THRESHOLD_DURATION_odp=2

Configuration