Add account ID and region to AWS trace log output #9084
Merged
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.
Motivation
There've been some support cases and issue reports where the root cause was a mismatch in account ID or region specified in the client requests. With multi-account being more widely adopted by our users, the account ID a request is made against is becoming an important part of the trace debug information.
Changes
This PR adds the AWS account ID / region name to the trace log outputs.
Format before:
Format after:
Happy for any suggestions regarding the message format. Also, we could consider hiding this behind a feature flag, or dumping the account ID only if it is different from the default account ID (
000000000000
), if we think that the output is becoming too spammy otherwise. No strong opinion from my side, we just need a mechanism to enable this output when debugging a user issue.