Comments (4)
-Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=us-east-1
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.
from aws-sdk-java.
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
AwsSdkMetrics.enableDefaultMetrics();
before sending s3 requests and finally java sdk can send metrics to aws cloudwatch successfully.
However, adding system properties -Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=us-east-1
to jvm is not an effective method since now.
If it is, this may be a sdk issue.
Just for your reference.
from aws-sdk-java.
Hi, debora.
Thanks for your reply.
I have a test in my local machine and still meet the issue.
Before you reply, I have run the application for a long time(0.5h) and enbled the debug level with the log4j tool.
Below is the config of log in my applicatiopn.
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# Turn on DEBUG logging in com.amazonaws.request to log
# a summary of requests/responses with {AWS} request IDs
log4j.logger.com.amazonaws.request=DEBUG
Can you provide the version of java and the java sdk, and do you pass the system property same as my method as below.
java -cp test.jar org.example.S3ClientDemo -Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=cn-north-1
Thanks for your help.
from aws-sdk-java.
I believe system properties should go first:
java -Dcom.amazonaws.sdk.enableDefaultMetrics=cloudwatchRegion=cn-north-1 -cp test.jar org.example.S3ClientDemo
from aws-sdk-java.
Related Issues (20)
- AWS SDK Metrics not reporting HttpClientPoolAvailableCount or HttpClientPoolPendingCount HOT 2
- ListNextBatchOfObjectsRequest does not retain RequestCredentialsProvider HOT 3
- Cognito User Pool Self-Service Sign-Up not working HOT 1
- Getting Unable to execute HTTP request: connect timed out: software.amazon.awssdk.core.exception.SdkClientException software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: connect timed out HOT 1
- AWS Java SDK not supporting environment variable override HOT 2
- (short issue description) HOT 1
- TransferManager.upload doesn't retain `bucketKeyEnabled` setting if using multipart upload HOT 3
- Getting "Credential should be scoped to a valid region." error when try to create an IAM client by using us-west-2 as a region HOT 3
- Intermittent stall of S3 PUT request for about 17 minutes HOT 4
- finalizeMultipartUpload is throwing 404 error HOT 3
- Invalid character issue "" in AmazonS3Client::listMultipartUploads HOT 5
- localstack SQS access broken in aws-java-sdk HOT 3
- com.amazonaws.auth package from different aws-java-xxx projects is causing problems when used in felix OSGI container. HOT 4
- "Access key or secret key are null" while using InstanceProfileCredentialsProvider.getCredentials() HOT 6
- Upgrade jackson databind to address known issues HOT 1
- put-object with sigv4, error occurs: com.amazonaws.SdkClientException: Unable to execute HTTP request: Read after end of file HOT 5
- AWS S3 - Getting java.net.UnknownHostException: document-storage-service.s3.ap-south-1.amazonaws.com intermittently HOT 1
- Unable to execute HTTP request: Unrecognized SSL message, plaintext connection HOT 1
- Amazon S3 v2 Has Behavioural Difference When Use KMS Encryption HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-java.