Share via

Send Synapse pyspark notebook logs to log analytics workspace

Suryanarayanan Swetha 0 Reputation points
2026-03-09T06:12:15.2433333+00:00

I want to send spark application logs to log analytics workspace and I am following the document here: https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-azure-log-analytics#write-custom-application-logs Is there a way to achieve this with managed identity and RBAC roles? I have made the following settings in my spark pool configurations and have ensure necessary role access in Azure Log analytics workspace as well. I am still getting an error that secret is invalid.

I am seeing an error "ERROR LogAnalyticsConfigurationLoader [LogAnalyticsConfigurationLoader-0]: Azure Log Analytics secret is invalid. Please check the configuration." . However, in my spark configuration, I have

spark.synapse.logAnalytics.enabled true

spark.synapse.logAnalytics.useManagedIdentity true

spark.synapse.logAnalytics.workspaceId <workspace id>

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.

{count} votes

Your answer

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