Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 22, 2025

Problem

The Application Insights Java agent was using a deprecated OpenTelemetry class reference that generates a warning:

2025-07-22 01:45:56.661Z WARN  i.o.s.a.ResourceConfiguration - Found reference to io.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProvider in otel.java.enabled.resource.providers. Please update to io.opentelemetry.sdk.autoconfigure.EnvironmentResourceProvider. Support for the old provider name will be removed after 1.49.0.

Solution

Updated the reference in AiConfigCustomizer.java from the deprecated io.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProvider to the current io.opentelemetry.sdk.autoconfigure.EnvironmentResourceProvider (removed the internal package).

Changes

  • Updated the property value in otel.java.enabled.resource.providers configuration
  • Updated the corresponding comment to reflect the change
  • Verified no other files in the codebase reference the deprecated class

This is a minimal change that addresses the deprecation warning without affecting any functionality. The build and formatting checks all pass successfully.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 123.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/ApplicationInsights-Java/ApplicationInsights-Java/agent/agent-tooling/build/tmp/test/work @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath7273276551858455882txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 6' (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] fix 2025-07-22 01:45:56.661Z WARN i.o.s.a.ResourceConfiguration - Found reference to io.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProvider in otel.java.enabled.resource.providers. Please update to io.opentelemetry.sdk.autoconfigure.E... Fix deprecated EnvironmentResourceProvider reference Jul 22, 2025
Copilot AI requested a review from trask July 22, 2025 02:02
Copilot finished work on behalf of trask July 22, 2025 02:02
@trask trask marked this pull request as ready for review July 22, 2025 03:39
@trask trask merged commit 3f5a008 into main Jul 22, 2025
146 of 160 checks passed
@trask trask deleted the copilot/fix-91fdc795-d744-4235-9095-d3563e9cdb5c branch July 22, 2025 16:57
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.

4 participants