Skip to content

Update codebase to follow style guide conventions#114

Closed
Copilot wants to merge 5 commits into
copilot-basefrom
copilot/fix-4b9ac285-ae89-4e7c-816e-dfa513f6c172
Closed

Update codebase to follow style guide conventions#114
Copilot wants to merge 5 commits into
copilot-basefrom
copilot/fix-4b9ac285-ae89-4e7c-816e-dfa513f6c172

Conversation

Copy link
Copy Markdown

Copilot AI commented Aug 24, 2025

This PR updates the codebase to align with the conventions outlined in docs/style-guide.md. The changes are minimal and focused on improving code consistency without affecting functionality.

Changes Made

Class Design

  • Added final keyword to 6 public API classes that implement interfaces (e.g., GCPResourceProvider, CloudFoundryResourceProvider, BaggageSpanProcessor)
  • These classes were not intended for inheritance, making them final clarifies the design intent

Method Parameters

  • Removed incorrect final keyword from 5 method parameters and loop variables in GroovyRunner.java
  • The style guide explicitly states that method parameters and local variables should never be declared final

Test Assertions

  • Converted JUnit assertions to AssertJ in 3 test files for better error messages:
    • OtelTraceStateTest (consistent56 package)
    • ConsistentSamplerTest
    • ConsistentProbabilityBasedSamplerTest
  • Changed assertEquals() calls to assertThat().isEqualTo() and assertTrue() to assertThat().isTrue()

SPI Registration

  • Added @AutoService annotations to 3 SPI implementations to automatically generate service registration files
  • Removed manual META-INF/services/ files that are now generated at compile time
  • Added required auto-service dependencies to affected modules

Verification

All changes have been tested:

  • Code compiles successfully
  • Tests pass without modification
  • Service registration works correctly with @AutoService
  • No breaking changes to public APIs

These updates improve code maintainability and consistency while following established OpenTelemetry Java conventions.

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:

  • 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 -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-9.0.0-bin/d6wjpkvcgsg3oed0qlfss3wgl/gradle-9.0.0/lib/gradle-daemon-main-9.0.0.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-9.0.0-bin/d6wjpkvcgsg3oed0qlfss3wgl/gradle-9.0.0/lib/agents/gradle-instrumentation-agent-9.0.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.0.0 (dns block)

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


💡 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 and others added 4 commits August 24, 2025 16:22
…to AssertJ

Co-authored-by: trask <218610+trask@users.noreply.github.com>
…sertions to AssertJ

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
…tions to AssertJ

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI changed the title [WIP] Code Update to Follow Style Guide Update codebase to follow style guide conventions Aug 24, 2025
Copilot AI requested a review from trask August 24, 2025 16:38
@trask trask closed this Aug 24, 2025
@trask trask deleted the copilot/fix-4b9ac285-ae89-4e7c-816e-dfa513f6c172 branch October 20, 2025 17:17
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.

2 participants