Summary
The Application Insights ServerTelemetryChannel (registered by AddApplicationInsightsTelemetryWorkerService()) buffers telemetry in memory and flushes it to the ingestion endpoint based on MaxTelemetryBufferDelay (default 30 seconds in the App Insights SDK, or sooner once the buffer fills). The Microsoft.Azure.Functions.Worker.ApplicationInsights integration does not expose this, so customers cannot tune how quickly telemetry becomes visible without reaching into the channel themselves.
Request
Expose the channel flush interval as a configurable option on the Functions worker Application Insights integration, and apply it to the ServerTelemetryChannel.
Proposed behavior
- New public
FunctionsApplicationInsightsOptions.MaxTelemetryBufferDelay (TimeSpan), default 8 seconds, minimum 5 seconds.
- Configurable via a new
ConfigureFunctionsApplicationInsights(Action<FunctionsApplicationInsightsOptions>) overload:
services
.AddApplicationInsightsTelemetryWorkerService()
.ConfigureFunctionsApplicationInsights(o => o.MaxTelemetryBufferDelay = TimeSpan.FromSeconds(8));
- Only applied when the configured telemetry channel is a
ServerTelemetryChannel. Values below the 5s minimum throw ArgumentOutOfRangeException.
Summary
The Application Insights
ServerTelemetryChannel(registered byAddApplicationInsightsTelemetryWorkerService()) buffers telemetry in memory and flushes it to the ingestion endpoint based onMaxTelemetryBufferDelay(default 30 seconds in the App Insights SDK, or sooner once the buffer fills). TheMicrosoft.Azure.Functions.Worker.ApplicationInsightsintegration does not expose this, so customers cannot tune how quickly telemetry becomes visible without reaching into the channel themselves.Request
Expose the channel flush interval as a configurable option on the Functions worker Application Insights integration, and apply it to the
ServerTelemetryChannel.Proposed behavior
FunctionsApplicationInsightsOptions.MaxTelemetryBufferDelay(TimeSpan), default 8 seconds, minimum 5 seconds.ConfigureFunctionsApplicationInsights(Action<FunctionsApplicationInsightsOptions>)overload:ServerTelemetryChannel. Values below the 5s minimum throwArgumentOutOfRangeException.