Skip to content

Conversation

@liustve
Copy link
Contributor

@liustve liustve commented Jun 4, 2025

Description of changes:

Merges changes from mainline to v2.11.1

Namely: #1085 and #1089

The following dependencies are using the latest release version:
 - com.sparkjava:spark-core:2.9.4
 - com.squareup.okhttp3:okhttp:4.12.0
 - io.opentelemetry:opentelemetry-extension-aws:1.20.1

The following dependencies have later release versions:
 - com.amazonaws:aws-java-sdk-bom [1.12.599 -> 1.12.785]
     https://aws.amazon.com/sdkforjava
 - com.fasterxml.jackson:jackson-bom [2.16.0 -> 2.19.0]
     https://github.com/FasterXML/jackson-bom
 - com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin [0.50.0 -> 0.52.0]
 - com.google.guava:guava-bom [33.0.0-jre -> 33.4.8-jre]
     https://github.com/google/guava
 - com.google.protobuf:protobuf-bom [3.25.1 -> 4.31.1]
     https://developers.google.com/protocol-buffers/
 - com.linecorp.armeria:armeria-bom [1.26.4 -> 1.32.5]
     https://armeria.dev/
 - commons-logging:commons-logging [1.2 -> 1.3.5]
     https://commons.apache.org/proper/commons-logging/
 - io.grpc:grpc-bom [1.59.1 -> 1.73.0]
     https://github.com/grpc/grpc-java
 - io.opentelemetry.contrib:opentelemetry-aws-resources [1.39.0-alpha -> 1.46.0-alpha]
     https://github.com/open-telemetry/opentelemetry-java-contrib
 - io.opentelemetry.contrib:opentelemetry-aws-xray [1.39.0-adot1 -> 1.46.0]
     https://github.com/open-telemetry/opentelemetry-java-contrib
 - io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha [2.11.0-adot2-alpha -> 2.16.0-alpha]
     https://github.com/open-telemetry/opentelemetry-java-instrumentation
 - io.opentelemetry.javaagent:opentelemetry-javaagent [2.11.0-adot2 -> 2.16.0]
     https://github.com/open-telemetry/opentelemetry-java-instrumentation
 - io.opentelemetry.proto:opentelemetry-proto [1.0.0-alpha -> 1.7.0-alpha]
     https://github.com/open-telemetry/opentelemetry-proto-java
 - net.bytebuddy:byte-buddy [1.14.10 -> 1.17.5]
     https://bytebuddy.net
 - org.apache.logging.log4j:log4j-bom [2.21.1 -> 2.24.3]
     https://logging.apache.org/log4j/2.x/
 - org.assertj:assertj-core [3.24.2 -> 3.27.3]
     https://assertj.github.io/doc/#assertj-core
 - org.curioswitch.curiostack:protobuf-jackson [2.2.0 -> 2.7.0]
     https://github.com/curioswitch/protobuf-jackson
 - org.junit:junit-bom [5.10.1 -> 5.13.0]
     https://junit.org/junit5/
 - org.slf4j:slf4j-api [1.7.36 -> 2.0.17]
     http://www.slf4j.org
 - org.slf4j:slf4j-simple [1.7.36 -> 2.0.17]
     http://www.slf4j.org
 - org.springframework.boot:spring-boot-dependencies [2.7.17 -> 3.5.0]
     https://spring.io/projects/spring-boot
 - org.testcontainers:testcontainers-bom [1.19.3 -> 1.21.1]
     https://java.testcontainers.org
 - software.amazon.awssdk:bom [2.21.33 -> 2.31.56]
     https://aws.amazon.com/sdkforjava

Gradle release-candidate updates:
 - Gradle: [8.10 -> 8.14.1]


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

jj22ee and others added 5 commits May 28, 2025 10:29
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
*Issue #, if available:*

We have done the ADOT Java v2.11.0 and as part of the process, we need
to merge the changes we made for this release back to the main branch.

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

*Description of changes:*
* Using GH UI created a new branch based on release/v.2.11.x
* Using GH UI created this PR to main
* Update otelSnapshotVersion to 2.12.0 in
`aws-otel-java-instrumentation.patch` and
`dependencyManagement/build.gradle.kts`
* Rebased from main

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

---------

Co-authored-by: Michael He <[email protected]>
Co-authored-by: ADOT Patch workflow <[email protected]>
A follow up from the 2.11.0 release. We are updating the image tags so
the newly released one gets scanned.

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

## What does this pull request do?
Cherry picks the Lambda Topology fix from our Lambda Layer v1 branch.

Original PR:
aws-observability#1016

## Test strategy
Unit tests and followed e2e test strategy used in the [original
PR](aws-observability#1016)
to sanity check correct behavior in service topology.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
### Description of changes:
Since upstream has updated the HTTP semantic conventions, the X-Ray
Remote Sampler has been outdated as it's been looking at the older
attributes that are no longer emitted. I've created a patch to
temporarily fix this until the change is merged upstream.

To create the patch file:
1. Cloned the
[opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib/)
repo
2. Ran `git checkout v1.39.0` to checkout to the same version used by
the latest release (2.11.0)
3. Made the changes in the `SamplingRuleApplier.java`,
`SamplingRuleApplierTest.java` and the `version.gradle.kts` files
4. Generated the patch file by running `git diff >
opentelemetry-java-contrib.patch`. This should be a temporary patch. I'm
creating another CR in upstream to fix this issue. Once it's fixed, we
will need to update the
[io.opentelemetry.contrib:opentelemetry-aws-xray](https://github.com/aws-observability/aws-otel-java-instrumentation/blob/284eed6a7e50237b2a677258bef58e8bf01c71d9/dependencyManagement/build.gradle.kts#L76)
version to the latest one.

### Testing:

**Testing Setup:**
1. Created a local build of the ADOT Distro by running the following:
```
./gradlew clean
./scripts/local_patch.sh //applies the patches including the new contrib patch
./gradlew build //this builds everything under the adot repo including the sample apps. 
```
2. Used the
[SpringBoot](https://github.com/aws-observability/aws-otel-java-instrumentation/tree/284eed6a7e50237b2a677258bef58e8bf01c71d9/sample-apps/springboot)
sample app which includes both the `outgoing-http-call` and the
`/aws-sdk-call` APIs
3. Started the AWS Adot Collector in a docker container to retrieve
Sampling Rules and to export traces to X-Ray
4. Started the Sample App using the following:
```
JAVA_TOOL_OPTIONS=" -javaagent:/Volumes/workplace/otel/aws-otel-java-instrumentation/otelagent/build/libs/aws-opentelemetry-agent-2.11.0-SNAPSHOT.jar" \
OTEL_METRICS_EXPORTER=none \
OTEL_LOGS_EXPORTER=none \
OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true \
OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics \
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces \
OTEL_RESOURCE_ATTRIBUTES="service.name=$YOUR_SVC_NAME" \
java -jar /Volumes/workplace/otel/aws-otel-java-instrumentation/sample-apps/springboot/build/libs/springboot-2.11.0-SNAPSHOT.jar
```

**Manual Testing:**

For the manual testing. I created three sampling rules
1. Default one with zero sampling
6. Second one with path = `/aws-sdk-call` with 100% sampling
7. Third one with path = `/outgoing-http-call` with 100% sampling

Before the change, calling any of the above APIs wasn't being matched
when it should. After the change, the rules were being matched and each
rule showed the correct stats.

**Before the change:**
![Screenshot 2025-06-01 at 11 34
56 PM](https://github.com/user-attachments/assets/6cc69450-8c8f-47e5-b428-65b2a6a0ef0c)

**After the change:**
![Screenshot 2025-06-01 at 11 29
54 PM](https://github.com/user-attachments/assets/dd10ba67-5e6a-475a-81f2-d8b6481fa71b)



By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
@liustve liustve requested a review from a team as a code owner June 4, 2025 21:24
@liustve liustve force-pushed the release/v2.11.1 branch 3 times, most recently from 69df4b9 to 5255564 Compare June 4, 2025 22:03
@liustve liustve closed this Jun 4, 2025
@liustve liustve deleted the release/v2.11.1 branch June 4, 2025 22: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.

6 participants