Skip to content

Bundling AWS X-Ray Agent with -javaagent causes JVM metrics to stop being reported #120

Description

@uziyonasi-nice

Following the official documentation we noticed the the JVM heap size and max threads count has stopped being recorded after adding the X-Ray agent via JVM arguments.

Below screenshot shows before and after removing the -javaagent parameter from the JAVA_OPTS:
jvm_metrics

I've included the AWS X-Ray agent using maven POM dependencies after removing the disco jar library from the JVM arguments and it did not interfere with reporting the JVM metrics (it can be seen in the screenshot in the relevant part of the graph starting at 11:35).

I tried to reproduce it locally by configuring the IDE to start the microservice the same way that the ECS task definition is loading the disco agent jar but couldn't see the same issue.
I've also managed to get the metric value by enabling spring actuator and retrieved it from the EC2 instance itself:
jvm_heap_size_actuator

But when calling the same metric via the ALB I was getting that the metric was not found.

Please let me know if agent/disco logs are needed and I will try to generate them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions