Skip to content

Latency Metrics Logging #5757

Discussion options

You must be logged in to vote

In v2, you can generate latency metrics by using a MetricPublisher -

        S3Client client = S3Client.builder()
            .region(Region.US_WEST_2)
            .overrideConfiguration(c->c.addMetricPublisher(LoggingMetricPublisher.create()))
            .build();

LoggingMetricPublisher is provided out-of-the-box, but there's also a way to publish metrics to CloudWatch.

For more info see Use SDK Metrics in our Dev Guide and check the examples in the blog post.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ozheng-circle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants