Skip to content

feat(sdk-core): Add User-Agent header with ft/warmup marker to HTTP client warm-up calls - #7288

Merged
joviegas merged 1 commit into
feature/master/crac_auto_priming_supportfrom
joviegas/user-agent-for-sdkwarmup
Aug 18, 2026
Merged

feat(sdk-core): Add User-Agent header with ft/warmup marker to HTTP client warm-up calls#7288
joviegas merged 1 commit into
feature/master/crac_auto_priming_supportfrom
joviegas/user-agent-for-sdkwarmup

Conversation

@joviegas

@joviegas joviegas commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

This change adds a User-Agent header to warm-up requests: the system user agent (SDK
version, Java version, OS, JVM metadata) plus an ft/warmup feature marker. It reuses
existing user-agent construction (SdkUserAgentBuilder, UserAgentConstant)

Modifications

  • HttpClientWarmer: add constants HEADER_USER_AGENT ("User-Agent") and
    WARM_UP_FEATURE_ID ("warmup"), and a static warmUpUserAgent() helper. The helper
    builds the system user agent with
    SdkUserAgentBuilder.buildSystemUserAgentString(SystemUserAgent.getOrCreate()) and appends
    ft/warmup with UserAgentConstant.appendSpaceAndField.
  • SyncHttpClientWarmer: build the value once in warmAll() and set it on the warm-up
    SdkHttpRequest.
  • AsyncHttpClientWarmer: build the value once in warmAll() and set it on the warm-up
    SdkHttpFullRequest.

Testing

  • Enabled org.apache.http.wire debug logging and ran the warm-up. The request carried the
    header:
16:20:59.004 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: aws-sdk-java/2.51.4-SNAPSHOT os/Mac_OS_X#56.7.8 lang/java#19.0.20.1 md/OpenJDK_64-Bit_Server_VM#11.0.20.1+9-LTS md/vendor#Some.com_Inc. md/en_US ft/warmup[\r][\n]"

License

  • I confirm that this pull request can be released under the Apache 2 license

@joviegas
joviegas requested a review from a team as a code owner August 17, 2026 23:24
@joviegas
joviegas requested review from davidh44 August 18, 2026 00:56
@joviegas
joviegas force-pushed the joviegas/user-agent-for-sdkwarmup branch from 4ec93b0 to 29a6ede Compare August 18, 2026 14:10
@joviegas
joviegas force-pushed the joviegas/user-agent-for-sdkwarmup branch from 29a6ede to 6e7d57d Compare August 18, 2026 14:13
@joviegas
joviegas merged commit 88e6b2e into feature/master/crac_auto_priming_support Aug 18, 2026
3 of 4 checks passed
@github-actions

Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants