Skip to content

Conversation

@alrod
Copy link
Member

@alrod alrod commented Oct 15, 2025

  • Exclude containers that are not intended for monitoring.
  • If a container is detected during the initial write log, further scanning is unnecessary.
  • Cache recently found write entry to avoid analyzing log blobs again
  • Migrate ScaleMonitor to TargetScaler

All of these optimizations are designed to enhance performance during blob trigger scaling from 0 to 1 and to address potential high memory usage issues.

Copilot AI review requested due to automatic review settings October 15, 2025 21:11
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Refactors blob trigger scaling infrastructure by migrating from ScaleMonitor to TargetScaler and introducing optimizations for zero-to-one scaling decisions based on recent blob writes.

  • Replaces IScaleMonitorProvider with ITargetScalerProvider and introduces BlobTargetScalerProvider with caching of recent write detection.
  • Adds targeted method GetFirstWriteForContainerAsync to efficiently locate the first relevant write entry and factors parsing logic into a reusable ParseLine method.
  • Adds new tests validating caching behavior and recent write detection logic.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
StorageBlobsWebJobsBuilderExtensions.cs Swaps service registration from IScaleMonitorProvider to ITargetScalerProvider to enable new scaling approach.
BlobTargetScalerProvider.cs Introduces TargetScaler implementation with cached recent write logic.
BlobLogListener.cs Adds efficient container-scoped write detection and line-level parsing integration.
StorageAnalyticsLogParser.cs Refactors inline parsing logic into reusable ParseLine method.
ZeroToOneTargetScalerTests.cs Adds unit tests validating scaling behavior and cache hit logging.
BlobScalerMonitorProvider.cs Removes deprecated ScaleMonitor-based implementation.
Comments suppressed due to low confidence (1)

sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/BlobTargetScalerProvider.cs:1

  • These using directives appear unused; removing them will reduce clutter.
// Copyright (c) Microsoft Corporation. All rights reserved.

@alrod alrod requested a review from mathewc October 20, 2025 23:45
@alrod alrod merged commit 6f87c8f into main Oct 21, 2025
17 checks passed
@alrod alrod deleted the alrod/lighweight-new-writes-detection1 branch October 21, 2025 21:47
amnguye pushed a commit that referenced this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants