Hi all! Anyone has experience with running Flink i...
# troubleshooting
t
Hi all! Anyone has experience with running Flink in application mode with the Datadog Java instrumentation agent? Wondering how to do it and if it's possible.
t
Hi Tudor first you need to install DD agent https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/?tab=datadoglibraries#install-and-configure-the-agent https://docs.datadoghq.com/containers/kubernetes/installation/?tab=operator Then if you would like to use auto instrumentation, 1. Download the agent artifact https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/java/?tab=wget#instrument-your-application 2. create a docker image from Flink base image, copy the instrument agent jar to ${FLINK_HOME}/lib folder (Or any other folder) 3. Add JVM args to flink-conf.yaml via
env.java.opts
or
env.java.opts.all
with given value from step #2 "-javaagent:path-to-agent-dir/dd-java-agent.jar -Ddd......." By default the basic metrics(from JVM) will be reporting to localhost and be picked by the dd agent you installed on k8s. If you would like to have Flink metrics as well, then you should enable StatsD reporter, https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/metric_reporters/#statsd report to localhost:8125 they will be scrapped by the dd agent.
t
Thanks @Tamir Sagi. I will try that for sure. I already have the Datadog HTTP metrics reporter setup and the cluster agent running in K8s. I am missing the Java instrumentation and I was confused on how to set up the java args.
h
Hey, @Tamir Sagi I've been looking to configure something similar, the data streams monitoring with Flink on Kuberntes and have gotten the streaming topology to show in the UI. However, the job isn't described here, rather just the task manager, I'm using a Flink session cluster, is there any way I can get job specific details here, or do I have to use the application cluster.