grafana / pyroscope-java

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

Question: how to set contextId into JFR when using AsyncProfiler in attach mode? #100

Closed moming00 closed 11 months ago

moming00 commented 11 months ago

Hi Guys, any idea how to set contextId into JFR without using AsyncProfiler in Java API mode. Currently I'm trying to retrieve the threadlocal variable context in AsyncProfiler code when dumping JFR. But the app crashed with error "guarantee(thread->can_call_java()) failed: cannot make java calls from the native compiler", could you share your thoughts on how to achieve this?