I want to add NewRelic instrumentation to my flink jobs. I don't see where it's possible to pass additional classpath / other params to the bin/flink run <job>
command.
The NewRelic java agent wants -javaagent:<path to jar>
added to the execution path. Passing in the config file path is advisable as well.
Edit:
I added this line to my conf/flink-conf.yaml on all (3) cluster machines:
env.java.opts: "-javaagent:/opt/newrelic/newrelic.jar -Dnewrelic.config.file=/opt/newrelic/newrelic.yml"
When I go to start the cluster only the job manager will start. The task manager doesn't start on any of the machines.
The only way I've found to add instrumentation (so far) is to change the command line at the end of bin/flink to include the above parameters. This is fine except that it requires the session where the command was running to remain open. If you exit out, the Flink job keeps going but the NewRelic agent quits.
JobManager
log say when you start it with the modifiedflink-conf.yaml
? – Thorleytaskmanager.log
say on the different machines? – Thorleyenv.java.opts
set on the TaskManager nodes viataskmanager.sh start
? You find the script in thebin/
directory. If there are no logs, then this mean that the JVM has problems to be started, which is really odd. – Thorley