Skip to content

[EventHubs] Replacing scaling logs to WebJobs extension methods#53925

Merged
alrod merged 1 commit into
mainfrom
alrod/replace-logs-eh
Mar 20, 2026
Merged

[EventHubs] Replacing scaling logs to WebJobs extension methods#53925
alrod merged 1 commit into
mainfrom
alrod/replace-logs-eh

Conversation

@alrod

@alrod alrod commented Nov 14, 2025

Copy link
Copy Markdown
Member

Summary

Replace direct LogWarning calls in the EventHubs scaling extensions with standardized LogFunctionScaleWarning WebJobs extension method.

This enables the Scale Controller's OpenTelemetry logger to intercept scaling warning events (EventId 8003) and forward them to the customer's Application Insights, providing visibility into connectivity errors during scaling.

Changes

  • EventHubMetricsProvider.cs: Replaced LogWarning with LogFunctionScaleWarning for partition info and checkpoint error logging
  • CHANGELOG.md: Added entry under Other Changes

Phase 2 (follow-up)

Migrating the LogInformation scale vote detail logs to LogFunctionScaleVote will follow once azure-webjobs-sdk #3189 ships (changes vote log level from Debug to Information).

Context

Part of the Scale Controller App Insights logging feature (AAPT-Antares-ScaleController PR #14140160).

Related PRs:

  • #53923 - Storage Queue extension
  • #53926 - ServiceBus extension
  • #975 - CosmosDB extension

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 replaces custom scaling logs with WebJobs extension methods to standardize logging for EventHubs scaling operations.

  • Refactored logging in EventHubsTargetScaler to use LogFunctionScaleVote extension method
  • Updated error logging in EventHubMetricsProvider to use LogFunctionScaleError extension method
  • Removed redundant try-catch blocks that were previously used only for logging warnings
  • Updated Microsoft.Azure.WebJobs package dependencies to version 3.0.42-dev to enable the new logging extension methods

Reviewed Changes

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

File Description
EventHubsTargetScaler.cs Consolidated two separate log statements into a single LogFunctionScaleVote call with concatenated details string
EventHubMetricsProvider.cs Replaced LogWarning with LogFunctionScaleError and removed try-catch blocks that only logged warnings without handling exceptions
Packages.Data.props Updated Microsoft.Azure.WebJobs packages to version 3.0.42-dev to support new logging extension methods
NuGet.Config Added local package source for development/testing purposes

Comment thread NuGet.Config Outdated
@alrod alrod force-pushed the alrod/replace-logs-eh branch 2 times, most recently from 076ca2a to be2e16a Compare November 15, 2025 00:52
@alrod alrod requested a review from mathewc November 15, 2025 00:53
@alrod alrod force-pushed the alrod/replace-logs-eh branch from be2e16a to 729774e Compare November 18, 2025 01:20
@alrod alrod marked this pull request as draft December 12, 2025 01:25
@github-actions

Copy link
Copy Markdown

Hi @alrod. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue. label Feb 13, 2026
@github-actions

Copy link
Copy Markdown

Hi @alrod. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions Bot closed this Feb 20, 2026
@alrod

alrod commented Mar 19, 2026

Copy link
Copy Markdown
Member Author

/reopen

@alrod alrod force-pushed the alrod/replace-logs-eh branch from a639788 to 1083ea8 Compare March 19, 2026 21:59
@alrod alrod merged commit 649de76 into main Mar 20, 2026
22 checks passed
@alrod alrod deleted the alrod/replace-logs-eh branch March 20, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants