Azure / azure-webjobs-sdk

Azure WebJobs SDK
MIT License
739 stars 358 forks source link

Delay Adaptive Sampling #3097

Closed RohitRanjanMS closed 1 month ago

RohitRanjanMS commented 2 months ago

Resolves #3100

The Functions runtime generates important telemetry during startup, but some logs are sampled out due to Adaptive sampling being enabled by default with a MaxTelemetryItemsPerSecond of 20. This results in some startup logs being lost when the sampling processor makes its decision.

The proposed change introduces a 15-second delay before Adaptive sampling begins, allowing initial telemetry to be more reliably ingested into AppInsights. The delay duration can be configured, and the feature can be disabled via host.json or appsettings override.