XRay and AwsParamStorePropertySource

0

I am trying to enable X-Ray on our application. At first we were only getting information for Dynamo, but then I realized I needed to include the instrumentors for both v1 and v2 versions of the dependencies in maven. Now my problem is that I am getting tons of errors because segments aren't created for initialization tasks.

10:46:35.602 [main] ERROR o.s.c.a.p.AwsParamStorePropertySourceLocator - Fail fast is set and there was an error reading configuration from AWS Parameter Store:
Failed to begin subsegment named 'AWSSimpleSystemsManagement': segment cannot be found.
10:46:35.645 [main] ERROR o.s.boot.SpringApplication - Application run failed

I found an article https://docs.aws.amazon.com/xray/latest/devguide/scorekeep-startup.html that seemed like it would give me what I wanted. The problem is that in that article the person has access to the code that is calling into the AWS SDK. In my case during start up we are calling to get a parameter store. This all happens outside of my direct control so I cannot easily wrap the call in a begin and endSegment call.

I am using Java 11, Springboot, and Maven.

I could just ignore the errors or change the logging level of that particular class to mask the issue, but that feels hacky. Is there another way to solve this? Any examples anywhere of someone solving it?

asked 2 years ago366 views
1 Answer
0

Hi Bryce,

If there aren’t any other issues apart from segments not being created for initialization tasks, it is fine to ignore the errors or change the logging level of that class. It is expected that segments aren't created for such initialization tasks.

AWS
Jon_L
answered 2 years ago
  • I did think about that. The problem was that apart from initialization tasks, there were also some off-thread issues where segments weren't getting created. I was getting spammed pretty heavily in the logs from those. I ended up opting to leave out the version 1 dependencies and just moved whatever I could to v2 APIs, which are instrumented properly. Maybe if I get some time to fix the off-thread issues, I might add them back in again.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions