-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Removing dependencies on Log4j (and as a necessary side effect stopping to export Log4J logs to Azuremonitor) #46608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing dependencies on Log4j (and as a necessary side effect stopping to export Log4J logs to Azuremonitor) #46608
Conversation
/azp run java - cosmos - spark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes Log4j dependencies from the Azure Cosmos Spark connector to resolve conflicts in Fabric/Synapse and ADF environments. The change eliminates the export of Spark Log4j logs to Azure Monitor while maintaining metrics and traces functionality.
- Removes all Log4j-related Maven dependencies and imports
- Eliminates Azure Monitor log configuration parameters and associated code
- Updates test cases to remove log-related assertions
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pom.xml | Removes Log4j Maven dependencies and OpenTelemetry log-related dependencies |
AzureMonitorConfig.scala | Removes log-related parameters from the AzureMonitorConfig case class |
CosmosConfig.scala | Removes log configuration entries and related parsing logic |
CosmosClientCache.scala | Removes Log4j imports and log configuration methods |
CosmosClientConfigurationSpec.scala | Removes Log4j import and log-related test assertions |
configuration-reference.md | Removes documentation for log-related configuration parameters |
sdk/cosmos/azure-cosmos-spark_3_2-12/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala
Show resolved
Hide resolved
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Description
Exporting the Spark Log4j logs to AzureMonitor along with metrics and traces causes issues due tot Log4j conflicts in Fabirc/Snypase and ADF - to mitigate those we have stopped exporting Log4j logs to AzureMonitor for now - we might reintorduce this later when identifying a safe way to avoid the Log4j conflicts.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines