Skip to content

Conversation

@reespozzi
Copy link
Contributor

@reespozzi reespozzi commented Dec 17, 2025

https://tools.hmcts.net/jira/browse/DTSPO-24922

AppInsights 2.x is no longer in support
We had it defaulted to this version in java-logging.

Teams got around this in a few ways:

  • avoid using our app-insights module entirely, and use the MS one
  • add app insights agent to their runtime via Dockerfile

App Insights agent is added into base images for java

We have no use of 2.x SDK anymore even though it's defined in this module as a hard dependency, meaning Dockerfile override or non-use.
Suggestion is that we publish a new 7.0.0 version of java-logging which removes the logging-appinsights - so when teams upgrade they can remove the dependency line i.e. removing

implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: versions.reformLogging

This change coupled with major version upgrade should remove confusion about 2.x SDK and remove any risk that we're still using it anywhere

@reespozzi reespozzi requested a review from Copilot December 17, 2025 15:29
Copy link

Copilot AI left a 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 the deprecated java-logging-appinsights module from the java-logging library as part of upgrading to version 7.0.0. The AppInsights 2.x SDK is no longer supported, and teams have already migrated to using Microsoft's agent directly via Dockerfile configurations rather than this module.

Key Changes:

  • Completely removes the java-logging-appinsights module and all its associated code
  • Updates the main README with migration instructions for teams upgrading from 6.x
  • Removes the module reference from settings.gradle

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
settings.gradle Removes the java-logging-appinsights module from the multi-module project configuration
java-logging-appinsights/build.gradle Deletes the entire build configuration for the appinsights module
java-logging-appinsights/README.md Removes comprehensive documentation about AppInsights SDK 2.x usage
java-logging-appinsights/src/main/resources/logback-appinsights.xml Removes logback appender configuration for AppInsights
java-logging-appinsights/src/main/resources/META-INF/spring.factories Removes Spring Boot auto-configuration registration
java-logging-appinsights/src/main/java/.../AppInsightsAutoConfiguration.java Deletes Spring auto-configuration class that registered AppInsights beans
java-logging-appinsights/src/main/java/.../ContextVersionInitializer.java Removes custom telemetry context initializer
java-logging-appinsights/src/main/java/.../SyntheticHeaders.java Deletes utility class for synthetic test headers
java-logging-appinsights/src/test/resources/application.yml Removes test configuration file
README.md Updates main documentation with migration guidance and removal notice

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@reespozzi reespozzi marked this pull request as ready for review December 18, 2025 14:20
@reespozzi reespozzi merged commit a830369 into master Jan 5, 2026
1 check passed
@reespozzi reespozzi deleted the remove-appinsights-module branch January 5, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants