Repository navigation
Add MetricPublisher support to the S3 CRT-based async client - #7500
Open
jencymaryjoseph wants to merge 8 commits into
Open
jencymaryjoseph wants to merge 8 commits into
jencymaryjoseph wants to merge 8 commits into
Conversation
* add client-level MetricPublisher support to the S3 CRT client * address review feedback
* add request-level MetricPublisher support to the S3 CRT client * drop @SdkTestInternalApi from CRT request-level metric helpers * refactor : stash request-level publishers once for copyObject instead of a per-sub-request wrapper * address review comments
…TMetricPublisher # Conflicts: # services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/crt/DefaultS3CrtAsyncClient.java # services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/crt/S3CrtAsyncHttpClient.java # services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/crt/S3CrtResponseHandlerAdapter.java # services/s3/src/test/java/software/amazon/awssdk/services/s3/internal/crt/S3CrtClientWiremockTest.java
* Publish additional S3 CRT request metrics * Use builder for S3 CRT response handler adapter
* Isolate S3 CRT metric publishers from event loop * Use debug logging for S3 CRT metric publishing * Address S3 CRT metric dispatcher review feedback * Address S3 CRT metric dispatcher review comments
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 and Context
The S3 CRT-based async client does not currently support SDK metric publication at the client or request level. Applications using existing or custom
MetricPublisherimplementations therefore cannot retain the same observability when adoptingS3AsyncClient.crtBuilder().This change converts CRT per-request telemetry into the standard
ApiCall → ApiCallAttempt → HttpClientmetric hierarchy. Each underlying HTTP attempt, including multipart subrequests and retries, produces a separate metric collection.CRT delivers telemetry on native event-loop threads. Calling customer publisher code directly from those callbacks allowed a slow publisher to delay other CRT work. Metric publication is therefore handed off to a bounded, client-scoped dispatcher.
Modifications
metricPublishers(Collection<MetricPublisher>)andaddMetricPublisher(MetricPublisher)toS3CrtAsyncClientBuilder.Only metrics available through current CRT telemetry are populated. Differences from the standard S3 client are documented in the developer guide.
Testing
GetObjectPutObjectScreenshots
N/A
Types of changes
Checklist
mvn installsucceeds.License