How to limit synapse spark to only send WARN/ERROR logs to log analytics workspace ?

_user_unknown_ 1 Reputation point
2024-12-18T16:08:15.2766667+00:00

I have followed the steps here: https://zcusa.951200.xyz/en-us/azure/synapse-analytics/spark/apache-spark-azure-log-analytics

But now all the internal driver/executor logs are getting sent to log analytics workspace, which is leading to storage issues. It sends internal logs like from files like "InMemoryCacheClient.scala", "TokenLibraryInternal.scala", etc.

Question is: How to control/limit so that the spark application only sends the application logs (written in my pyspark code) ?

Using Synapse 3.4 runtime - spark3.4

Using pyspark.

I have tried adding log4j properties as part of spark config, but its not working.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,093 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.