How should be the application insight javaagent called in spark submit command?

Goel, Akanksha 66 Reputation points
2021-01-05T15:17:50.907+00:00

I am using :

https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent

I want to log messages with the help of application insight java agent but sending through the following command is not helping

spark-submit --name $job_name --class com.dell.sadh.azure.SACClickstreamParser --master yarn --deploy-mode cluster --verbose \
--num-executors 2 --driver-memory 4g --executor-memory 16g --executor-cores 4 --files $APPLICATION_CONFIG,$APPLICATIONINSIGHT_CONFIG \
--packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0 \
--conf 'spark.driver.extraJavaOptions=-Dlog4jspark.root.logger=INFO,console -javaagent:"applicationinsights-agent-3.0.1-BETA.2.jar"' \
--conf 'spark.executor.extraJavaOptions=-Dlog4jspark.root.logger=INFO,console -javaagent:"applicationinsights-agent-3.0.1-BETA.2.jar"' \
--jars "applicationinsights-agent-3.0.1-BETA.2.jar" $HOME/$jar_name $env application.conf &> ${LOG}

Can anybody help me on this?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.