Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Similar to open-telemetry/opentelemetry-java#7586

This PR pins the otel/opentelemetry-collector-contrib:latest Docker image to a specific versioned release with SHA256 digest in the AwsXrayRemoteSamplerIntegrationTest.

Changes

  1. Pinned collector image version: Updated AwsXrayRemoteSamplerIntegrationTest.java to use otel/opentelemetry-collector-contrib:0.137.0@sha256:886722fe0f37af9d1fe24d29529253ec59fbf263b3b1df4facaf221373e19d23 instead of :latest

  2. Added Renovate automation: Updated .github/renovate.json5 to:

    • Override default ignore patterns to include test files (ignorePaths: [])
    • Add a custom regex manager to automatically track and update Docker image versions in Java files
    • Enable automatic PR creation when new collector versions are released

Benefits

  • Reproducibility: Running tests locally will use the same collector version as CI
  • Version transparency: The collector version is explicitly visible in the test file where it's used
  • Automatic updates: Renovate will monitor for new releases and create PRs to update the version
  • Security: SHA256 digest ensures image integrity and prevents supply chain attacks

This follows the same pattern established in the main opentelemetry-java repository for consistent dependency management across the OpenTelemetry Java ecosystem.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

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

  • https://api.github.com/repos/open-telemetry/opentelemetry-collector-releases/releases/latest
    • Triggering command: curl -sL REDACTED (http block)
  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/gradle-daemon-main-9.1.0.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/agents/gradle-instrumentation-agent-9.1.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.1.0 (dns block)

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

Original prompt

Pin otel/opentelemetry-collector-contrib:latest

Similar to @open-telemetry/opentelemetry-java/pull/7586


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Pin opentelemetry-collector-contrib to latest version Pin otel/opentelemetry-collector-contrib:latest to versioned image Oct 10, 2025
Copilot finished work on behalf of trask October 10, 2025 16:22
Copilot AI requested a review from trask October 10, 2025 16:22
@github-actions github-actions bot requested review from srprash and wangzlei October 10, 2025 16:27
@otelbot-java-contrib
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

@trask trask marked this pull request as ready for review October 10, 2025 16:31
@trask trask requested a review from a team as a code owner October 10, 2025 16:31
@Container
private static final GenericContainer<?> otelCollector =
new GenericContainer<>(DockerImageName.parse("otel/opentelemetry-collector-contrib:latest"))
new GenericContainer<>(DockerImageName.parse("otel/opentelemetry-collector-contrib:0.136.0"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentionally pinning earlier version where --log-level DEBUG still existed, want to test Renovate autoupdate and will fix then

@trask trask added this pull request to the merge queue Oct 13, 2025
Merged via the queue into main with commit 7aebc1b Oct 13, 2025
25 checks passed
@trask trask deleted the copilot/pin-opentelemetry-collector branch October 13, 2025 17:06
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