Language

InstrumentationOptions Class

Definition

Controls which telemetry signals and auto-instrumentations are active. All options default to true (opt-out model).

public class InstrumentationOptions
type InstrumentationOptions = class
Public Class InstrumentationOptions
Inheritance
InstrumentationOptions

Constructors

Name Description
InstrumentationOptions()

Properties

Name Description
EnableAgent365Instrumentation

Gets or sets a value indicating whether Agent365 SDK scope and baggage instrumentation is enabled (Agent365Sdk source). Default: true.

EnableAgentFrameworkInstrumentation

Gets or sets a value indicating whether Microsoft Agent Framework instrumentation is enabled (Experimental.Microsoft.Agents.AI*). Default: true.

EnableAspNetCoreInstrumentation

Gets or sets a value indicating whether ASP.NET Core incoming request instrumentation is enabled. Default: true.

EnableAzureSdkInstrumentation

Gets or sets a value indicating whether Azure SDK client library instrumentation is enabled. Default: true.

EnableHttpClientInstrumentation

Gets or sets a value indicating whether HttpClient outgoing request instrumentation is enabled. Default: true.

EnableLogging

Gets or sets a value indicating whether OpenTelemetry log export is enabled. When false, a provider-scoped None filter is added to OpenTelemetryLoggerProvider, suppressing all log records from reaching any OpenTelemetry exporter (Azure Monitor, OTLP, Console). Other logging providers (console logger, file logger, etc.) are not affected. Default: true.

EnableMetrics

Gets or sets a value indicating whether the metrics pipeline is enabled. When false, no MeterProvider is configured. Default: true.

EnableOpenAIInstrumentation

Gets or sets a value indicating whether OpenAI and Azure OpenAI SDK instrumentation is enabled (Azure.AI.OpenAI*, OpenAI.*, Experimental.Microsoft.Extensions.AI). Default: true.

EnableSemanticKernelInstrumentation

Gets or sets a value indicating whether Semantic Kernel orchestrator instrumentation is enabled (Microsoft.SemanticKernel*). Default: true.

EnableSqlClientInstrumentation

Gets or sets a value indicating whether SQL Client database call instrumentation is enabled. Default: true.

EnableTracing

Gets or sets a value indicating whether the distributed tracing pipeline is enabled. When false, no TracerProvider is configured and all library-level tracing options are ignored. Default: true.

Applies to