Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

AzureBlobGrainStorage and AzureTableGrainStorage were logging their entire options objects at Information level during initialization. This is redundant with SiloOptionsLogger and can cause issues with loggers that don't handle complex object serialization well.

Changes

  • Logging level: Changed from Information to Debug
  • Log content: Removed options object parameter, now logging only essential properties:
    • AzureBlobGrainStorage: name and ContainerName
    • AzureTableGrainStorage: provider name and TableName

This aligns with the pattern used by other storage providers (e.g., Redis, which also uses Debug level and logs specific properties).

// Before
LogInformationInitializing(this.options);  // Logs entire AzureBlobStorageOptions object

// After  
LogDebugInitializing(this.name, this.options.ContainerName);  // Logs only name and container
Original prompt

This section details on the original issue you should resolve

<issue_title>AzureBlobStorage: do not log options class during initialization.</issue_title>
<issue_description>See this line: https://github.com/dotnet/orleans/blob/be2d273c694bd9e2281e9525302f63d5cb3da7a9/src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureBlobStorage.cs#L367-L372C30

We should not log the options class here. It is already logged by SiloOptionsLogger, so this is redundant and it can cause issues for some loggers. We should also reduce this log line to Debug level.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Microsoft Reviewers: Open in CodeFlow

Copilot AI changed the title [WIP] Fix logging of options class during AzureBlobStorage initialization Remove redundant options logging in Azure storage providers Nov 24, 2025
Copilot AI requested a review from ReubenBond November 24, 2025 21:02
Copilot finished work on behalf of ReubenBond November 24, 2025 21:02
@ReubenBond ReubenBond marked this pull request as ready for review November 25, 2025 03:26
Copilot AI review requested due to automatic review settings November 25, 2025 03:26
@ReubenBond ReubenBond enabled auto-merge November 25, 2025 03:26
@ReubenBond ReubenBond force-pushed the copilot/fix-log-options-in-initialization branch from 16b1730 to 7d6fed7 Compare November 25, 2025 03:26
Copilot finished reviewing on behalf of ReubenBond November 25, 2025 03:27
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

This PR addresses issue #9806 by removing redundant options object logging from Azure storage providers. The AzureBlobGrainStorage and AzureTableGrainStorage initialization logs are changed from Information to Debug level and now log only essential properties instead of the entire options object, which is already logged by SiloOptionsLogger.

Key changes:

  • Logging level reduced from Information to Debug for initialization messages in both providers
  • Changed from logging entire options objects to logging only specific essential properties (ContainerName/TableName)
  • Aligns with the pattern used by other storage providers like RedisGrainStorage

Reviewed changes

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

File Description
AzureBlobStorage.cs Updated initialization logging to Debug level, now logs only name and ContainerName instead of full options object
AzureTableStorage.cs Updated initialization logging to Debug level, now logs only provider name and TableName instead of full options object

@ReubenBond ReubenBond added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit c9cd173 Nov 25, 2025
57 checks passed
@ReubenBond ReubenBond deleted the copilot/fix-log-options-in-initialization branch November 25, 2025 04:30
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.

AzureBlobStorage: do not log options class during initialization.

2 participants