Open ahus1 opened 2 years ago
A friend showed me kubectl-flame (https://github.com/yahoo/kubectl-flame) which uses a separate container to fetch the profiling information, which also works for Java containers. This would avoid running the Java container itself as a privileged pod and wouldn't require changing existing deployments.
Any thoughts on that approach? Thanks!
Hi Alexander, I agree that having a profiler that you can just attach to any application without requiring code change would be great. We have this on our roadmap, but it might take a while until it gets done.
Hi Fabian - long time no see! Good to know that this is on the road map, will keep an eye on it!
Hey, have you seen that https://github.com/dpsoft/ap-agent is an agent that already support pprof and expose an api?
It would be great to package JPProf as a Java agent, so I can specify it on the command line of an existing application and don't need to change my applications.
Other frameworks like open telemetry do this already. See https://github.com/open-telemetry/opentelemetry-java-instrumentation, and looking at the standalone example this should hopefully be possible.
There would be the need to pass the port as a parameter, for example as a system property (
-Dgrafana.jpprof.port=xxx
).Thanks!