-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling Metrics for the AWS SDK for Java failed without no error msg #3109
Comments
Hi, I have a test with this sdk and here is what I found. As a workaround, I tried to enable this feature by adding However, adding system properties Just for your reference. |
If there's no error in the logs and no metrics are being published to Cloudwatch, my guess is that the system property is not being picked up by your application for some reason, or the application doesn't live long enough to send Cloudwatch metrics (metrics are pooled and sent every 2 minutes or so). I tested the system property in my local machine and it is working normally, I tested us-east-1 and ap-northeast-1 regions. If you still want to investigate this, you can try to increase the log level to see if more detailed errors show up when the metrics publisher try to send the requests to Cloudwatch. |
Hi, debora. I have a test in my local machine and still meet the issue.
Can you provide the version of java and the java sdk, and do you pass the system property same as my method as below. Thanks for your help. |
I believe system properties should go first: java -Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=cn-north-1 -cp test.jar org.example.S3ClientDemo |
Upcoming End-of-Support
Describe the issue
Hi, engineer.
Here is an problem of Enabling Metrics for the AWS SDK java v1.
I followed our official docs as below to enable Metrics for the AWS SDK, but no metric is sent to cloudwatch metrics.
https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/generating-sdk-metrics.html
I have a test followed the official doc in both china(cn-north-1) and global(us-east-1 and ap-northeast-1) region and have tried several version of java sdk v1, but never successed to send data to cloudwatch metric.
.
Besides, I enabled java sdk detailed logs in my java code and can not find any requests log to cloudwatch service.(only see s3 debug log)
It seems that it is not enabled with the config: -Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=us-east-1
Can you tell me what I MIISSED with my java project? And Considering that aws java sdk v1 is an old version, does this feature is available for now?
You can see the java code and pom that I used in the attachement.
The pom described as bellow:
java demo code
Thanks for your help.
Links
https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/generating-sdk-metrics.html
The text was updated successfully, but these errors were encountered: