Java - Amazon CodeGuru Profiler (original) (raw)

You can add support for the CodeGuru Profiler agent into your Java application by adding the following lines into your startup or main function.

import software.amazon.codeguruprofilerjavaagent.Profiler;

class MyClass {
    public static void main(String[] args) {
        Profiler.builder()
            .profilingGroupName("MyProfilingGroup")
            .build()
            .start();
        ...
    }
}

You need to add a dependency to the agent .jar file.

Enabling the agent with code

Scala

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.