Agent365ExporterOptions class

Options controlling the behavior of the Agent365 OpenTelemetry span exporter.

These values tune batching, timeouts, token acquisition and endpoint shape. All properties have sensible defaults so callers can usually construct without arguments and override selectively.

Properties

clusterCategory

Environment / cluster category (e.g. ClusterCategory.preprod, ClusterCategory.prod, default to ClusterCategory.prod).

exporterTimeoutMilliseconds

Maximum time (ms) the BatchSpanProcessor waits for the entire export() call to complete before giving up. Covers partitioning, token resolution, and all HTTP retries.

httpRequestTimeoutMilliseconds

Timeout (ms) for each individual HTTP request to the observability backend. Applies per fetch() call inside the retry loop; each retry gets a fresh timeout.

maxExportBatchSize

Maximum number of spans per export batch.

maxPayloadBytes

Upper bound on HTTP request body size in bytes. 100 KB headroom under the 1 MB server limit for estimator error and JSON/envelope overhead (for example, resource attributes and scope wrappers).

maxQueueSize

Maximum span queue size before drops occur (passed to BatchSpanProcessor).

scheduledDelayMilliseconds

Delay between automatic batch flush attempts.

tokenResolver

App-only OBS token resolver required when constructing Agent365Exporter. There is no implicit cache lookup or request-context token fallback.

useS2SEndpoint

Deprecated compatibility option. Export always uses the S2S path, even when false.

Property Details

clusterCategory

Environment / cluster category (e.g. ClusterCategory.preprod, ClusterCategory.prod, default to ClusterCategory.prod).

clusterCategory: string

Property Value

string

exporterTimeoutMilliseconds

Maximum time (ms) the BatchSpanProcessor waits for the entire export() call to complete before giving up. Covers partitioning, token resolution, and all HTTP retries.

exporterTimeoutMilliseconds: number

Property Value

number

httpRequestTimeoutMilliseconds

Timeout (ms) for each individual HTTP request to the observability backend. Applies per fetch() call inside the retry loop; each retry gets a fresh timeout.

httpRequestTimeoutMilliseconds: number

Property Value

number

maxExportBatchSize

Maximum number of spans per export batch.

maxExportBatchSize: number

Property Value

number

maxPayloadBytes

Upper bound on HTTP request body size in bytes. 100 KB headroom under the 1 MB server limit for estimator error and JSON/envelope overhead (for example, resource attributes and scope wrappers).

maxPayloadBytes: number

Property Value

number

maxQueueSize

Maximum span queue size before drops occur (passed to BatchSpanProcessor).

maxQueueSize: number

Property Value

number

scheduledDelayMilliseconds

Delay between automatic batch flush attempts.

scheduledDelayMilliseconds: number

Property Value

number

tokenResolver

App-only OBS token resolver required when constructing Agent365Exporter. There is no implicit cache lookup or request-context token fallback.

tokenResolver?: TokenResolver

Property Value

useS2SEndpoint

Deprecated compatibility option. Export always uses the S2S path, even when false.

useS2SEndpoint: boolean

Property Value

boolean