grafana / pyroscope-java

pyroscope java integration
Apache License 2.0
72 stars 31 forks source link

allocLive is not supported in JDK 8 #122

Closed wang-qijia closed 6 months ago

wang-qijia commented 8 months ago

Code:

PyroscopeAgent.start(
    new Config.Builder()
        .setApplicationName("test-service")
        .setProfilingEvent(EventType.ITIMER)
        .setAllocLive(true)
        .setProfilingAlloc("1k")
        .setFormat(Format.JFR)
        .setServerAddress("http://localhost:4040")
        .build()
);

Exception Log:

2023-10-10 19:29:33.034 [ERROR] Error starting profiler java.lang.IllegalStateException: java.lang.IllegalStateException: 'live' option is supported on OpenJDK 11+.
korniltsev commented 6 months ago

That is expected behavior. You need jvm 11 for live objects