Skip to content
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

Onboarding ADOT Java to v2.x - with otel v2.10.0 (NOT READY) #975

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

zzhlogin
Copy link
Contributor

@zzhlogin zzhlogin commented Dec 11, 2024

Description of changes:
Onboarding ADOT Java to v2.x, with the latest opentelemetry-java-instrumentation dependency is version v2.10.0. And upgrade the workflows, adot core implementation codes, contract tests and smoke tests with following change:
A. Workflows:

  1. Update .github/patches/opentelemetry-java-instrumentation.patch file with the same code change as previous patch based on upstream v2.10.0.
  2. Upgrade contract testing build env with JDK 23.

B. Core repo:

  1. Upgrade com.github.johnrengelman.shadow to com.gradleup.shadow as it has been marked under maintenance mode: https://github.com/GradleUp/shadow?tab=readme-ov-file#gradle-shadow
  2. Upgrade to new ktlint version 1.4.0, and apply latest spotless format.
  3. Upgrade gradle to 8.10
  4. Upgrade com.diffplug.spotless to newer version 6.25.0
  5. Upgrade com.google.cloud.tools.jib to newer version 3.4.4
  6. Update the unit test to check the migrated semantic conventions.

C. Contract tests:

  1. Use the latest kotlin("jvm") version to be compatible if the new Java class from upstream.
  2. Add OTEL_EXPORTER_OTLP_PROTOCOL to grpc for instrumentation as in version v2.0.0:

The default OTLP protocol has been changed from grpc to http/protobuf in orderto align with the specification.

  1. Update the test classes to migrate to the new semantic conventions to match with upstream latest change:
    a. All the change made in Support new semantice conventions. #972
    b. extra semantic conventions included in contract tests:
    messaging.kafka.destination.partition -> messaging.destination.partition.id
    messaging.message.payload_size_bytes -> messaging.message.body.size
    c. Remove network.protocol.name attribute check as it has marked as Conditionally required if not http and network.protocol.version is set: https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#summary-of-changes.
    d. Conditionally check peer.service for http client. Match with PR: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12083/files
    e. Remove local socket attributes from http server span check as it is not extracted from HttpServerAttributesExtractor (code),
    f. Remove http.response.header.content_length as it need an explicit configuration: https://opentelemetry.io/docs/specs/semconv/attributes-registry/http/#http-response-header

D. Smoke tests
https://opentelemetry.io/docs/zero-code/java/agent/disable/#suppressing-controller-andor-view-spans

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@zzhlogin zzhlogin requested a review from a team as a code owner December 11, 2024 23:04
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.

1 participant