@@ -177,7 +177,8 @@ public CompletableFuture<APostOperationResponse> aPostOperation(APostOperationRe
177
177
.withOperationName ("APostOperation" )
178
178
.withMarshaller (new APostOperationRequestMarshaller (protocolFactory ))
179
179
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
180
- .hostPrefixExpression (resolvedHostExpression ).withInput (aPostOperationRequest ));
180
+ .withMetricCollector (apiCallMetricCollector ).hostPrefixExpression (resolvedHostExpression )
181
+ .withInput (aPostOperationRequest ));
181
182
AwsRequestOverrideConfiguration requestOverrideConfig = aPostOperationRequest .overrideConfiguration ().orElse (null );
182
183
executeFuture .whenComplete ((r , e ) -> {
183
184
Optional <MetricPublisher > metricPublisher = MetricUtils .resolvePublisher (clientConfiguration ,
@@ -237,7 +238,7 @@ public CompletableFuture<APostOperationWithOutputResponse> aPostOperationWithOut
237
238
.withOperationName ("APostOperationWithOutput" )
238
239
.withMarshaller (new APostOperationWithOutputRequestMarshaller (protocolFactory ))
239
240
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
240
- .withInput (aPostOperationWithOutputRequest ));
241
+ .withMetricCollector ( apiCallMetricCollector ). withInput (aPostOperationWithOutputRequest ));
241
242
AwsRequestOverrideConfiguration requestOverrideConfig = aPostOperationWithOutputRequest .overrideConfiguration ()
242
243
.orElse (null );
243
244
executeFuture .whenComplete ((r , e ) -> {
@@ -320,8 +321,8 @@ public CompletableFuture<Void> eventStreamOperation(EventStreamOperationRequest
320
321
.withMarshaller (new EventStreamOperationRequestMarshaller (protocolFactory ))
321
322
.withAsyncRequestBody (software .amazon .awssdk .core .async .AsyncRequestBody .fromPublisher (adapted ))
322
323
.withFullDuplex (true ).withResponseHandler (responseHandler )
323
- .withErrorResponseHandler (errorResponseHandler ).withInput ( eventStreamOperationRequest ),
324
- restAsyncResponseTransformer );
324
+ .withErrorResponseHandler (errorResponseHandler ).withMetricCollector ( apiCallMetricCollector )
325
+ . withInput ( eventStreamOperationRequest ), restAsyncResponseTransformer );
325
326
AwsRequestOverrideConfiguration requestOverrideConfig = eventStreamOperationRequest .overrideConfiguration ().orElse (
326
327
null );
327
328
executeFuture .whenComplete ((r , e ) -> {
@@ -398,7 +399,7 @@ public CompletableFuture<EventStreamOperationWithOnlyInputResponse> eventStreamO
398
399
.withMarshaller (new EventStreamOperationWithOnlyInputRequestMarshaller (protocolFactory ))
399
400
.withAsyncRequestBody (software .amazon .awssdk .core .async .AsyncRequestBody .fromPublisher (adapted ))
400
401
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
401
- .withInput (eventStreamOperationWithOnlyInputRequest ));
402
+ .withMetricCollector ( apiCallMetricCollector ). withInput (eventStreamOperationWithOnlyInputRequest ));
402
403
AwsRequestOverrideConfiguration requestOverrideConfig = eventStreamOperationWithOnlyInputRequest
403
404
.overrideConfiguration ().orElse (null );
404
405
executeFuture .whenComplete ((r , e ) -> {
@@ -477,6 +478,7 @@ public CompletableFuture<Void> eventStreamOperationWithOnlyOutput(
477
478
.withOperationName ("EventStreamOperationWithOnlyOutput" )
478
479
.withMarshaller (new EventStreamOperationWithOnlyOutputRequestMarshaller (protocolFactory ))
479
480
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
481
+ .withMetricCollector (apiCallMetricCollector )
480
482
.withInput (eventStreamOperationWithOnlyOutputRequest ), restAsyncResponseTransformer );
481
483
AwsRequestOverrideConfiguration requestOverrideConfig = eventStreamOperationWithOnlyOutputRequest
482
484
.overrideConfiguration ().orElse (null );
@@ -547,7 +549,7 @@ public CompletableFuture<GetWithoutRequiredMembersResponse> getWithoutRequiredMe
547
549
.withOperationName ("GetWithoutRequiredMembers" )
548
550
.withMarshaller (new GetWithoutRequiredMembersRequestMarshaller (protocolFactory ))
549
551
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
550
- .withInput (getWithoutRequiredMembersRequest ));
552
+ .withMetricCollector ( apiCallMetricCollector ). withInput (getWithoutRequiredMembersRequest ));
551
553
AwsRequestOverrideConfiguration requestOverrideConfig = getWithoutRequiredMembersRequest .overrideConfiguration ()
552
554
.orElse (null );
553
555
executeFuture .whenComplete ((r , e ) -> {
@@ -605,7 +607,7 @@ public CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOpera
605
607
.withOperationName ("PaginatedOperationWithResultKey" )
606
608
.withMarshaller (new PaginatedOperationWithResultKeyRequestMarshaller (protocolFactory ))
607
609
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
608
- .withInput (paginatedOperationWithResultKeyRequest ));
610
+ .withMetricCollector ( apiCallMetricCollector ). withInput (paginatedOperationWithResultKeyRequest ));
609
611
AwsRequestOverrideConfiguration requestOverrideConfig = paginatedOperationWithResultKeyRequest
610
612
.overrideConfiguration ().orElse (null );
611
613
executeFuture .whenComplete ((r , e ) -> {
@@ -740,7 +742,7 @@ public CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedOp
740
742
.withOperationName ("PaginatedOperationWithoutResultKey" )
741
743
.withMarshaller (new PaginatedOperationWithoutResultKeyRequestMarshaller (protocolFactory ))
742
744
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
743
- .withInput (paginatedOperationWithoutResultKeyRequest ));
745
+ .withMetricCollector ( apiCallMetricCollector ). withInput (paginatedOperationWithoutResultKeyRequest ));
744
746
AwsRequestOverrideConfiguration requestOverrideConfig = paginatedOperationWithoutResultKeyRequest
745
747
.overrideConfiguration ().orElse (null );
746
748
executeFuture .whenComplete ((r , e ) -> {
@@ -882,8 +884,8 @@ public CompletableFuture<StreamingInputOperationResponse> streamingInputOperatio
882
884
AsyncStreamingRequestMarshaller .builder ()
883
885
.delegateMarshaller (new StreamingInputOperationRequestMarshaller (protocolFactory ))
884
886
.asyncRequestBody (requestBody ).build ()).withResponseHandler (responseHandler )
885
- .withErrorResponseHandler (errorResponseHandler ).withAsyncRequestBody ( requestBody )
886
- .withInput (streamingInputOperationRequest ));
887
+ .withErrorResponseHandler (errorResponseHandler ).withMetricCollector ( apiCallMetricCollector )
888
+ .withAsyncRequestBody ( requestBody ). withInput (streamingInputOperationRequest ));
887
889
AwsRequestOverrideConfiguration requestOverrideConfig = streamingInputOperationRequest .overrideConfiguration ()
888
890
.orElse (null );
889
891
executeFuture .whenComplete ((r , e ) -> {
@@ -958,8 +960,8 @@ public <ReturnT> CompletableFuture<ReturnT> streamingInputOutputOperation(
958
960
new StreamingInputOutputOperationRequestMarshaller (protocolFactory ))
959
961
.asyncRequestBody (requestBody ).transferEncoding (true ).build ())
960
962
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
961
- .withAsyncRequestBody ( requestBody ). withInput ( streamingInputOutputOperationRequest ),
962
- asyncResponseTransformer );
963
+ .withMetricCollector ( apiCallMetricCollector ). withAsyncRequestBody ( requestBody )
964
+ . withInput ( streamingInputOutputOperationRequest ), asyncResponseTransformer );
963
965
AwsRequestOverrideConfiguration requestOverrideConfig = streamingInputOutputOperationRequest .overrideConfiguration ()
964
966
.orElse (null );
965
967
executeFuture .whenComplete ((r , e ) -> {
@@ -1028,7 +1030,8 @@ public <ReturnT> CompletableFuture<ReturnT> streamingOutputOperation(
1028
1030
.withOperationName ("StreamingOutputOperation" )
1029
1031
.withMarshaller (new StreamingOutputOperationRequestMarshaller (protocolFactory ))
1030
1032
.withResponseHandler (responseHandler ).withErrorResponseHandler (errorResponseHandler )
1031
- .withInput (streamingOutputOperationRequest ), asyncResponseTransformer );
1033
+ .withMetricCollector (apiCallMetricCollector ).withInput (streamingOutputOperationRequest ),
1034
+ asyncResponseTransformer );
1032
1035
AwsRequestOverrideConfiguration requestOverrideConfig = streamingOutputOperationRequest .overrideConfiguration ()
1033
1036
.orElse (null );
1034
1037
executeFuture .whenComplete ((r , e ) -> {
0 commit comments