Skip to content

Suppress polling logs by event name - #11947

Open
Rohit Ranjan (RohitRanjanMS) wants to merge 8 commits into
devfrom
rohitranjanms-suppress-additional-polling-logs
Open

Rohit Ranjan (RohitRanjanMS) wants to merge 8 commits into
devfrom
rohitranjanms-suppress-additional-polling-logs

Conversation

@RohitRanjanMS

@RohitRanjanMS Rohit Ranjan (RohitRanjanMS) commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Issue describing the changes in this PR

Follow-up to #11603.

Moves FunctionsLogs noise suppression into SystemLogger, where category, level, and EventName are available together. The standard ILoggingBuilder.AddFilter callback only receives category and level, so it cannot distinguish individual events — which is why the previous approach had to drop every Debug/Trace log in a category.

Suppression is driven by a single declarative table. An empty event list suppresses the whole category; otherwise only the listed EventNames are suppressed:

Category Suppressed events
Host.Executor all (unchanged from #11603)
Microsoft.Azure.WebJobs.EventHubs.EventHubProducerClientImpl all (unchanged from #11603)
Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.QueueListener GetMessages, BackoffDelay
Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener GetMessages, BackoffDelay
Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener PollBlobContainer, BlobAlreadyProcessed, BlobDoesNotMatchPattern

Adding a category or event requires only a new line in that table.

Compared to the original approach, this preserves queue/blob listener start/stop lifecycle logs, HandlingStorageException, BlobMessageEnqueued, ContainerDoesNotExist, FunctionNotFound, BlobHasNoETag, and the other low-volume diagnostics that share these categories.

Telemetry data

A 30-minute production FunctionsLogs sample contained ~992.5M Debug/Trace rows. The queue rules cover 13.52% and the blob rules 4.76%; together with the existing Event Hub producer suppression the targeted rules cover ~20.6% of Debug/Trace volume, while the retained blob diagnostics are 3–4 orders of magnitude smaller (for example BlobMessageEnqueued at ~118K).

Event Hub PartitionProcessor (8.87%) and Kafka (2.40%) are intentionally not suppressed. Their Debug logs carry no EventName, so they cannot be filtered without discarding partition lifecycle, checkpoint, batching, and native-initialization diagnostics. Targeting those requires the extensions to emit stable named EventIds first.

Scope and safety

  • Applies only to the internal SystemLogger sink, so customer-configured providers (Application Insights, OpenTelemetry, console) continue to honor host.json.
  • Only affects Debug/Trace; Information and above are untouched.
  • Diagnostic mode bypasses suppression entirely.
  • The suppression check runs before the message formatter, so suppressed logs are not formatted.

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
  • My changes do not require documentation changes
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
  • My changes do not require diagnostic events changes
  • I have added all required tests (Unit tests, E2E tests)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Copilot AI lite review requested due to automatic review settings August 27, 2026 07:10
@RohitRanjanMS
Rohit Ranjan (RohitRanjanMS) requested a review from a team as a code owner August 27, 2026 07:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the existing log-category suppression filter to reduce high-volume polling noise by dropping Debug/Trace logs for additional well-known listener categories, while preserving Information+ events. It builds on the earlier telemetry noise suppression work from #11603.

Changes:

  • Added four additional polling-related logging categories to the suppressed-category set (Debug/Trace only).
  • Expanded unit test coverage to assert suppression behavior (Debug/Trace suppressed; Information+ allowed) for the newly added categories.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Adds new high-volume polling categories to the suppression allowlist (Info+) / denylist (Debug/Trace).
test/WebJobs.Script.Tests/Extensions/ScriptLoggingBuilderExtensionsTests.cs Adds unit test cases validating the new categories are suppressed at Debug/Trace and allowed at Information+.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Outdated
Comment thread src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Outdated
Comment thread src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Outdated
Comment thread src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Outdated
Comment thread src/WebJobs.Script/Extensions/ScriptLoggingBuilderExtensions.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
@RohitRanjanMS Rohit Ranjan (RohitRanjanMS) changed the title Suppress additional polling logs Suppress polling logs by event name Sep 16, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc802fbd-2254-4fb7-81a2-58c1da953c68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants