APM Java Agent : No instrumentation/response from public api

Hi There,
I was trying with public API of APM to get response for my custom class but I don't see any such information on Kibana or instrumentation details on APM java agent log.
Not sure what I am doing wrong. I had tried with @CaptureTransaction .
In this method I am intentionally throwing a null pointer exception to see it in Kibana.
public String getTestName() {
Transaction transaction = ElasticApm.startTransaction();
String a=null;
try(final Scope scope = transaction.activate())

        return a.toString();
    catch (Exception e) {
        throw e;
    } finally {


Hi and thanks for trying out Elastic APM :slight_smile:

Have you added the agent as a -javaagent flag? This is required even when using the public API.


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.