Fixed issue with logging suffix in user agent being duplicated#341
Merged
Conversation
…he user agent is too big and requests stop working
normj
commented
Oct 13, 2025
|
|
||
| client.BeforeRequestEvent += ServiceClientBeforeRequestEvent; | ||
| client.ExceptionEvent += ServiceClienExceptionEvent; | ||
| client.ExceptionEvent += ServiceClientExceptionEvent; |
Member
Author
There was a problem hiding this comment.
This change wasn't relevant to the issue, just fixing a typo in the private method name.
There was a problem hiding this comment.
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
ServiceClienExceptionEventtoServiceClientExceptionEvent - 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.
AlexDaines
approved these changes
Oct 13, 2025
GarrettBeatty
approved these changes
Oct 13, 2025
sankettangade
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.