aws-sdk-kotlin
aws-sdk-kotlin copied to clipboard
Custom user agent metadata does not appear in User-Agent header
Describe the bug
When setting custom user age metadata via an aws.customMetadata.*
system property, the expected values do not show up in requests's User-Agent
header. Different metadata set via the aws.frameworkMetadata
property do properly show up so this seems to be unique to custom metadata.
Expected behavior
Custom metadata set via aws.customMetadata.*
are included in the User-Agent
header.
Current behavior
Custom metadata set via aws.customMetadata.*
are not included in the User-Agent
header.
Steps to Reproduce
Configure DEBUG-level logging and run the following code:
System.setProperty("aws.customMetadata.foo", "bar")
val s3 = S3Client.fromEnvironment { sdkLogMode = SdkLogMode.LogRequest }
s3.listObjectsV2 { bucket = "<some-bucket>" }
View the DEBUG output and inspect the request headers. The User-Agent
string contains other metadata but not the custom metadata foo=bar
.
Possible Solution
No response
Context
No response
AWS Kotlin SDK version used
0.17.6-SNAPSHOT
Platform (JVM/JS/Native)
OpenJDK Runtime Environment Corretto-17.0.4.8.1 (build 17.0.4+8-LTS)
Operating System and version
Amazon Linux 2