awslabs / aws-crt-java

Java bindings for the AWS Common Runtime
Apache License 2.0
54 stars 40 forks source link

Metrics publisher support in CRT client #806

Open suman-ganta opened 1 month ago

suman-ganta commented 1 month ago

Describe the bug

Netty based client supports specifying metrics publisher. This seem to be missing from the CRT builder. This need to be supported to publish client side metrics.

With Netty client

var client = S3AsyncClient
             .builder()
             .region(US_WEST_2)
             .overrideConfiguration(c -> c.addMetricPublisher(new MyMetricsPublisher()))
            .build()

With CRT client

var client = S3AsyncClient.crtBuilder()
            .region(US_WEST_2)
            .build()

Expected Behavior

Ability to publish client side metrics

Current Behavior

Does not have any way to publish client side metrics

Reproduction Steps

Always reproducible.

Possible Solution

No response

Additional Information/Context

No response

aws-crt-java version used

0.30.0

Java version used

18

Operating System and version

Linux

jmklix commented 1 month ago

Thanks for pointing this out. This is a feature request, rather than a bug. We are looking into how complicated and what priority this feature request is.

suman-ganta commented 1 month ago

Thanks @jmklix for triaging. Are there workarounds or alternatives for this? How are CRT S3 client users publishing client side metrics to CloudWatch today?

jmklix commented 1 month ago

You can try publishing your own custom metrics to CloudWatch with putMetricData.

jmklix commented 1 month ago

P143829291

suman-ganta commented 1 month ago

You can try publishing your own custom metrics to CloudWatch with putMetricData.

I'm referring to publishing metrics captured by the client, which are internal to the CRT S3 client.