Skip to content

Conversation

@normj
Copy link
Member

@normj normj commented Oct 13, 2025

Issue #, if available:
#340

Description of changes:
In the recent release we updated to the SDK's new API for appending information to the logging API. There was an issue with the change that since logging library reuses the request object how the user agent string was being built it would duplicate the logging suffix on every request. This would work till the user agent it a size limit and then requests would start failing.

The fix is to add a check to make sure the suffix hasn't already been added before adding the logging suffix.

I tests this by first recreating with the user's code in the GitHub issue and the after the change confirming the user agent suffix is only added once.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…he user agent is too big and requests stop working

client.BeforeRequestEvent += ServiceClientBeforeRequestEvent;
client.ExceptionEvent += ServiceClienExceptionEvent;
client.ExceptionEvent += ServiceClientExceptionEvent;
Copy link
Member Author

Choose a reason for hiding this comment

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

This change wasn't relevant to the issue, just fixing a typo in the private method name.

@GarrettBeatty GarrettBeatty requested a review from Copilot October 13, 2025 22:05
Copy link

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

Fixes an issue where the logging suffix in the user agent string was being duplicated on every request, eventually causing requests to fail when the user agent exceeded size limits.

  • Fixed typo in method name from ServiceClienExceptionEvent to ServiceClientExceptionEvent
  • Added duplicate check before adding user agent component to prevent multiple additions of the same suffix
  • Updated changelog configuration for patch releases across all logging packages

Reviewed Changes

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

File Description
src/AWS.Logger.Core/Core/AWSLoggerCore.cs Fixed method name typo and added logic to prevent duplicate user agent suffix additions
.autover/changes/52c0e0b8-9e89-458c-8ee1-07433da667d9.json Added changelog entries for patch releases across all logging packages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@normj normj merged commit f11f12b into dev Oct 13, 2025
8 checks passed
@normj normj deleted the normj/fix-340 branch October 13, 2025 22:18
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