On 18 Jan 2022, at 13:18, Emmanuel Bernard wrote:
Hi,
I am having conversations with teams using Quarkus in production in
containers and figuring out the tooling they want to be able to diagnose
when something goes not OK in production in one of the containerized
quarkus apps.Their initial thought was to use JMX as their entry door to apply some
operations. But
1. I'm not sure a JMX entry door is the right thing to do
2. JMX and native executable are still not a thing anywaysSo my question is do we have a document describing the options to diagnose
a Quarkus app in Kubernetes deployed containers?
If not, how can we discuss it to find the best options and to build such a
document?Specific needs that got raised thus far:
- thread dump capture
- heap dump capture
- maybe flamegraph
- maybe JFR (though I don't think they have instrumented their app for it)
They don't need to instrument their app for it - can be enabled via command line flags or with a sidecar.
They need a wide net as it is about diagnostics before finding a clue and
zooming in.
So first - I don't actually think we have a good doc for it but makes sense we make one - below my own thoughts on what to cover.
oc exec (I belive kubectl has similar now but forget its name)/max
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANYWk7Md%3DxRTsb54CX6aMcAhEy6Lzjtt%2B7U_7fKoJoFaZ1ro_A%40mail.gmail.com.
On 18 Jan 2022, at 13:18, Emmanuel Bernard wrote:
Hi,
I am having conversations with teams using Quarkus in production in
containers and figuring out the tooling they want to be able to diagnose
when something goes not OK in production in one of the containerized
quarkus apps.Their initial thought was to use JMX as their entry door to apply some
operations. But
1. I'm not sure a JMX entry door is the right thing to do
2. JMX and native executable are still not a thing anywaysSo my question is do we have a document describing the options to diagnose
a Quarkus app in Kubernetes deployed containers?
If not, how can we discuss it to find the best options and to build such a
document?Specific needs that got raised thus far:
- thread dump capture
- heap dump capture
- maybe flamegraph
- maybe JFR (though I don't think they have instrumented their app for it)They don't need to instrument their app for it - can be enabled via command line flags or with a sidecar.
They need a wide net as it is about diagnostics before finding a clue and
zooming in.So first - I don't actually think we have a good doc for it but makes sense we make one - below my own thoughts on what to cover.
- One should be using traditional cloud native means first (enable monitoring/telemetry etc.) - expectation is that they have existing infrastructure that can gather that info.
- if the app is running in jvm mode then I don't see why to exclude using JMX - it is a rich source of info. Would be a mistake to not utilize it IMO.
- for JFR - look into cryostat which could gather JFR data (https://developers.redhat.com/blog/2021/01/25/introduction-to-containerjfr-jdk-flight-recorder-for-containers)
- beyond that - it is just java; so all the tricks in the book applies; i.e. if you have access to the container via sidecars, port forwards etc. you can use jcmd, jps, jstat etc. to get tons of info without stopping the instance using things like
oc exec(I belivekubectlhas similar now but forget its name)
Metrics to your dashboard
Logs -> to some centralized logging system of your choice (e.g. Elastic, CloudWatch)
Trace -> ...
They are very useful and cost ~1% overhead (default jfr profile)
Use cryostat to enable JFR in your Quarkus or Java container
Set the default.jfr: See JAVA_HOME/lib/jfr/default.jfc
JFR can create:
thread dumps every “chunk” whatever that is
Heap dumps every n nanoseconds
Does JFR and cryostat work for mandrel?
How do you change these settings (chunk and nanosecond value)?
How to make it easier for people to set cryostat from a quarkus app to a kube deployment?
Next step is to use a script that captures the relevant information from the Kubernetes pod(s).
This script has to be run by a specially authorized group of people.
Specific needs that got raised thus far:
- thread dump capture
- heap dump capture
- maybe flamegraph
- maybe JFR
Note that JFR can do thread and heap dump for you.
Otherwise, use the jmap/jstack/etc tools
https://stackoverflow.com/questions/64121941/how-to-get-a-heap-dump-from-kubernetes-k8s-pod
https://www.jaktech.co.uk/java/how-to-get-java-memory-heap-dump-from-pod-in-kubernetes/
TODO get the specific examples here
Azure Spring Cloud has higher level commands for it
https://docs.microsoft.com/en-us/azure/spring-cloud/how-to-capture-dumps
I like it.--
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/8E4B4A33-065A-4FA1-848B-E87E2891D775%40redhat.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/5EF4F6E8-F558-4489-9618-FA904FAE7593%40redhat.com.
Looks good - wanna make a PR for a guide starting point ?