A365Options interface

A365 observability configuration options.

These are the public-facing options passed via the a365 scope of MicrosoftOpenTelemetryOptions.

Properties

authScopes

OAuth scopes for A365 service authentication.

clusterCategory

Cluster category for the A365 service endpoint.

domainOverride

Override the A365 observability service domain.

enabled

Enable A365 observability. When false, no A365 components are created.

enableObservabilityExporter

Enable the A365 HTTP observability exporter (Agent365Exporter).

Defaults to false. When false (and enabled is true), the A365SpanProcessor is still registered for baggage/attribute enrichment of downstream exporters (Azure Monitor, OTLP, console, …) but no data is sent to the A365 observability service.

Equivalent to the ENABLE_A365_OBSERVABILITY_EXPORTER environment variable. The programmatic value wins when both are set.

Has no effect when enabled is false.

exporterTimeoutMilliseconds

Maximum time (ms) for the entire export() call.

httpRequestTimeoutMilliseconds

Timeout (ms) per individual HTTP request. Each retry gets a fresh timeout.

logLevel

Log level for A365 observability components.

Accepts none, info, warn, error, or a |-separated combination (e.g. "warn|error"). Defaults to none when neither this option nor the A365_OBSERVABILITY_LOG_LEVEL environment variable is set. When set, this option overrides the environment variable.

maxExportBatchSize

Maximum number of spans per export batch.

maxPayloadBytes

Maximum estimated payload size (bytes) per HTTP chunk.

maxQueueSize

Maximum span queue size before drops occur.

observabilityScopeOverride

Single-string override for the A365 observability authentication scope.

Equivalent to the A365_OBSERVABILITY_SCOPES_OVERRIDE environment variable; when supplied, it becomes the sole entry of the resolved authScopes array. Mirrors the Python distro's a365_observability_scope_override kwarg (microsoft/opentelemetry-distro-python#87).

Precedence (highest to lowest): this option > env var > authScopes.

scheduledDelayMilliseconds

Delay (ms) between automatic batch flush attempts.

tokenResolver

Token resolver for authenticating with the A365 observability service. Called with (agentId, tenantId, authScopes) extracted from span attributes/config. Must return a bearer token string or a promise resolving to one.

useS2SEndpoint

When true, use the S2S endpoint path for export.

Property Details

authScopes

OAuth scopes for A365 service authentication.

authScopes?: string[]

Property Value

string[]

clusterCategory

Cluster category for the A365 service endpoint.

clusterCategory?: ClusterCategory

Property Value

domainOverride

Override the A365 observability service domain.

domainOverride?: string

Property Value

string

enabled

Enable A365 observability. When false, no A365 components are created.

enabled?: boolean

Property Value

boolean

enableObservabilityExporter

Enable the A365 HTTP observability exporter (Agent365Exporter).

Defaults to false. When false (and enabled is true), the A365SpanProcessor is still registered for baggage/attribute enrichment of downstream exporters (Azure Monitor, OTLP, console, …) but no data is sent to the A365 observability service.

Equivalent to the ENABLE_A365_OBSERVABILITY_EXPORTER environment variable. The programmatic value wins when both are set.

Has no effect when enabled is false.

enableObservabilityExporter?: boolean

Property Value

boolean

exporterTimeoutMilliseconds

Maximum time (ms) for the entire export() call.

exporterTimeoutMilliseconds?: number

Property Value

number

httpRequestTimeoutMilliseconds

Timeout (ms) per individual HTTP request. Each retry gets a fresh timeout.

httpRequestTimeoutMilliseconds?: number

Property Value

number

logLevel

Log level for A365 observability components.

Accepts none, info, warn, error, or a |-separated combination (e.g. "warn|error"). Defaults to none when neither this option nor the A365_OBSERVABILITY_LOG_LEVEL environment variable is set. When set, this option overrides the environment variable.

logLevel?: string

Property Value

string

maxExportBatchSize

Maximum number of spans per export batch.

maxExportBatchSize?: number

Property Value

number

maxPayloadBytes

Maximum estimated payload size (bytes) per HTTP chunk.

maxPayloadBytes?: number

Property Value

number

maxQueueSize

Maximum span queue size before drops occur.

maxQueueSize?: number

Property Value

number

observabilityScopeOverride

Single-string override for the A365 observability authentication scope.

Equivalent to the A365_OBSERVABILITY_SCOPES_OVERRIDE environment variable; when supplied, it becomes the sole entry of the resolved authScopes array. Mirrors the Python distro's a365_observability_scope_override kwarg (microsoft/opentelemetry-distro-python#87).

Precedence (highest to lowest): this option > env var > authScopes.

observabilityScopeOverride?: string

Property Value

string

scheduledDelayMilliseconds

Delay (ms) between automatic batch flush attempts.

scheduledDelayMilliseconds?: number

Property Value

number

tokenResolver

Token resolver for authenticating with the A365 observability service. Called with (agentId, tenantId, authScopes) extracted from span attributes/config. Must return a bearer token string or a promise resolving to one.

tokenResolver?: (agentId: string, tenantId: string, authScopes?: string[]) => string | Promise<string>

Property Value

(agentId: string, tenantId: string, authScopes?: string[]) => string | Promise<string>

useS2SEndpoint

When true, use the S2S endpoint path for export.

useS2SEndpoint?: boolean

Property Value

boolean