Skip to content

Commit c9841b1

Browse files
committed
Move ApplyUserAgentStage to later position in request pipeline
1 parent 8371fa1 commit c9841b1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS SDK for Java v2",
4+
"contributor": "",
5+
"description": "Move `ApplyUserAgentStage` to later position in request pipeline to ensure all business metrics are properly recorded before finalizing user agent."
6+
}

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/AmazonAsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ public <OutputT> CompletableFuture<OutputT> execute(
193193
.first(RequestPipelineBuilder
194194
.first(MakeRequestMutableStage::new)
195195
.then(ApplyTransactionIdStage::new)
196-
.then(ApplyUserAgentStage::new)
197196
.then(MergeCustomHeadersStage::new)
198197
.then(MergeCustomQueryParamsStage::new)
199198
.then(QueryParametersToBodyStage::new)
200199
.then(() -> new CompressRequestStage(httpClientDependencies))
201200
.then(() -> new HttpChecksumStage(ClientType.ASYNC))
201+
.then(ApplyUserAgentStage::new)
202202
.then(MakeRequestImmutableStage::new)
203203
.then(RequestPipelineBuilder
204204
.first(AsyncSigningStage::new)

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/AmazonSyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ public <OutputT> OutputT execute(HttpResponseHandler<Response<OutputT>> response
181181
.first(RequestPipelineBuilder
182182
.first(MakeRequestMutableStage::new)
183183
.then(ApplyTransactionIdStage::new)
184-
.then(ApplyUserAgentStage::new)
185184
.then(MergeCustomHeadersStage::new)
186185
.then(MergeCustomQueryParamsStage::new)
187186
.then(QueryParametersToBodyStage::new)
188187
.then(() -> new CompressRequestStage(httpClientDependencies))
189188
.then(() -> new HttpChecksumStage(ClientType.SYNC))
189+
.then(ApplyUserAgentStage::new)
190190
.then(MakeRequestImmutableStage::new)
191191
// End of mutating request
192192
.then(RequestPipelineBuilder

0 commit comments

Comments
 (0)