Skip to content

Class AzureMonitorExportOptions

Namespace: Cephalon.Observability.AzureMonitor.Configuration
Assembly: Cephalon.Observability.AzureMonitor.dll

Configures Azure Monitor exporter wiring on top of the shared Cephalon telemetry contract.

public sealed class AzureMonitorExportOptions

objectAzureMonitorExportOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Initializes a new instance of the class.

public AzureMonitorExportOptions()

Gets or sets the Azure Monitor / Application Insights connection string used by the exporter.

public string? ConnectionString { get; set; }

string?

Gets or sets the hosted Azure platform whose default resource attributes should be applied.

public string? HostedPlatform { get; set; }

string?

Supported values are appservice, functions, aks, containerapps, and vm. The package maps them to the current OpenTelemetry cloud.platform attribute values.

Gets or sets a value indicating whether the exporter should authenticate with DefaultAzureCredential.

public bool UseDefaultAzureCredential { get; set; }

bool

The connection string still determines the Azure Monitor resource endpoint. This flag only adds Azure Active Directory authentication on top of that endpoint selection.

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Binds Azure Monitor export options from configuration.

public static AzureMonitorExportOptions FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")

configuration IConfiguration

The application configuration root.

sectionPath string

The configuration section path that contains the engine settings. The default is Engine.

AzureMonitorExportOptions

The bound Azure Monitor export options.