Skip to content

Commit c509106

Browse files
committed
Update workflow to use jdk23.
1 parent b89c85b commit c509106

File tree

10 files changed

+38
-224
lines changed

10 files changed

+38
-224
lines changed

.github/workflows/main-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
fetch-depth: 0
195195
- uses: actions/setup-java@v4
196196
with:
197-
java-version: 21
197+
java-version: 23
198198
distribution: 'temurin'
199199
- uses: gradle/wrapper-validation-action@v1
200200

@@ -219,7 +219,7 @@ jobs:
219219
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}
220220

221221
- name: Pull base image of Contract Tests Sample Apps
222-
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine
222+
run: docker pull public.ecr.aws/docker/library/amazoncorretto:23-alpine
223223

224224
- name: Build snapshot with Gradle
225225
uses: gradle/gradle-build-action@v3

.github/workflows/nightly-upstream-snapshot-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
fetch-depth: 0
121121
- uses: actions/setup-java@v4
122122
with:
123-
java-version: 21
123+
java-version: 23
124124
distribution: 'temurin'
125125
- uses: gradle/wrapper-validation-action@v1
126126

@@ -136,7 +136,7 @@ jobs:
136136
registry: public.ecr.aws
137137

138138
- name: Pull base image of Contract Tests Sample Apps
139-
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine
139+
run: docker pull public.ecr.aws/docker/library/amazoncorretto:23-alpine
140140

141141
- name: Build snapshot with Gradle
142142
uses: gradle/gradle-build-action@v3

.github/workflows/pr-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ jobs:
8484
- name: Set up Java version for tests
8585
uses: actions/setup-java@v4
8686
with:
87-
java-version: 21
87+
java-version: 23
8888
distribution: temurin
8989

9090
- name: Pull base image of Contract Tests Sample Apps
9191
if: ${{ matrix.os == 'ubuntu-latest' }}
92-
run: docker pull public.ecr.aws/docker/library/amazoncorretto:21-alpine
92+
run: docker pull public.ecr.aws/docker/library/amazoncorretto:23-alpine
9393

9494
- name: Run contract tests
9595
uses: gradle/gradle-build-action@v3

README.md

Lines changed: 1 addition & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -45,152 +45,4 @@ In addition to the sample apps in this repository, there are also a set of [stan
4545
Please note that as per policy, we're providing support via GitHub on a best effort basis. However, if you have AWS Enterprise Support you can create a ticket and we will provide direct support within the respective SLAs.
4646

4747
## Security issue notifications
48-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
49-
50-
before spans data!!!!!!!:
51-
[SpanData{
52-
spanContext=ImmutableSpanContext{
53-
traceId=674e4054ae4f6dc29558bb93e01c88aa,
54-
spanId=b3e242267283ef6e,
55-
traceFlags=01,
56-
traceState=ArrayBasedTraceState{
57-
entries=[]},
58-
remote=false,
59-
valid=true},
60-
parentSpanContext=ImmutableSpanContext{
61-
traceId=00000000000000000000000000000000,
62-
spanId=0000000000000000,
63-
traceFlags=00,
64-
traceState=ArrayBasedTraceState{
65-
entries=[]},
66-
remote=false,
67-
valid=false},
68-
resource=Resource{
69-
schemaUrl=https://opentelemetry.io/schemas/1.24.0,
70-
attributes={
71-
aws.local.service="aws-sdk-v1",
72-
container.id="5c1a417aec8a09b7a1e687a8a8554292f7a7d383817aaf8dddd07bdacb8e691b",
73-
host.arch="amd64",
74-
host.name="5c1a417aec8a",
75-
os.description="Linux 5.10.228-198.884.amzn2int.x86_64",
76-
os.type="linux",
77-
process.command_line="/usr/lib/jvm/java-21-amazon-corretto/bin/java
78-
-javaagent:/opentelemetry-javaagent-all.jar com.amazon.sampleapp.App",
79-
process.executable.path="/usr/lib/jvm/java-21-amazon-corretto/bin/java",
80-
process.pid=1,
81-
process.runtime.description="Amazon.com Inc. OpenJDK 64-Bit Server VM 21.0.5+11-LTS",
82-
process.runtime.name="OpenJDK Runtime Environment",
83-
process.runtime.version="21.0.5+11-LTS",
84-
service.instance.id="ccb7b47f-ccd5-4cc2-b32c-034b5804694f",
85-
service.name="aws-sdk-v1",
86-
telemetry.distro.name="opentelemetry-java-instrumentation",
87-
telemetry.distro.version="1.33.0-aws-SNAPSHOT",
88-
telemetry.sdk.language="java",
89-
telemetry.sdk.name="opentelemetry",
90-
telemetry.sdk.version="1.44.1"}},
91-
instrumentationScopeInfo=InstrumentationScopeInfo{
92-
name=io.opentelemetry.jetty-8.0,
93-
version=2.10.0-alpha,
94-
schemaUrl=null,
95-
attributes={}},
96-
name=GET /s3/createbucket/:bucketname,
97-
kind=SERVER,
98-
startEpochNanos=1733181524709878370,
99-
endEpochNanos=1733181527659649586,
100-
attributes=AttributesMap{data={
101-
http.route=/s3/createbucket/:bucketname,
102-
server.port=33887,
103-
http.request.method=GET,
104-
url.path=/s3/createbucket/create-bucket, h
105-
ttp.response.status_code=200,
106-
network.peer.address=172.22.0.1,
107-
server.address=localhost,
108-
client.address=172.22.0.1,
109-
thread.id=53,
110-
url.scheme=http,
111-
thread.name=qtp901050607-53,
112-
network.protocol.version=1.1,
113-
network.peer.port=55828,
114-
user_agent.original=armeria/1.26.4},
115-
capacity=128,
116-
totalAddedValues=14},
117-
totalAttributeCount=14,
118-
events=[],
119-
totalRecordedEvents=0,
120-
links=[],
121-
totalRecordedLinks=0,
122-
status=ImmutableStatusData{statusCode=UNSET, description=},
123-
hasEnded=true}]
124-
125-
126-
after modifiedSpans data!!!!!!!:
127-
[DelegatingSpanData{spanContext=ImmutableSpanContext{
128-
traceId=674e4054ae4f6dc29558bb93e01c88aa,
129-
spanId=b3e242267283ef6e,
130-
traceFlags=01,
131-
traceState=ArrayBasedTraceState{
132-
entries=[]},
133-
remote=false,
134-
valid=true},
135-
parentSpanContext=ImmutableSpanContext{
136-
traceId=00000000000000000000000000000000,
137-
spanId=0000000000000000,
138-
traceFlags=00,
139-
traceState=ArrayBasedTraceState{
140-
entries=[]},
141-
remote=false, valid=false},
142-
resource=Resource{
143-
schemaUrl=https://opentelemetry.io/schemas/1.24.0,
144-
attributes={aws.local.service="aws-sdk-v1",
145-
container.id="5c1a417aec8a09b7a1e687a8a8554292f7a7d383817aaf8dddd07bdacb8e691b",
146-
host.arch="amd64",
147-
host.name="5c1a417aec8a",
148-
os.description="Linux 5.10.228-198.884.amzn2int.x86_64",
149-
os.type="linux",
150-
process.command_line="/usr/lib/jvm/java-21-amazon-corretto/bin/java
151-
-javaagent:/opentelemetry-javaagent-all.jar com.amazon.sampleapp.App",
152-
process.executable.path="/usr/lib/jvm/java-21-amazon-corretto/bin/java",
153-
process.pid=1,
154-
process.runtime.description="Amazon.com Inc. OpenJDK 64-Bit Server VM 21.0.5+11-LTS",
155-
process.runtime.name="OpenJDK Runtime Environment",
156-
process.runtime.version="21.0.5+11-LTS",
157-
service.instance.id="ccb7b47f-ccd5-4cc2-b32c-034b5804694f",
158-
service.name="aws-sdk-v1",
159-
telemetry.distro.name="opentelemetry-java-instrumentation",
160-
telemetry.distro.version="1.33.0-aws-SNAPSHOT",
161-
telemetry.sdk.language="java",
162-
telemetry.sdk.name="opentelemetry",
163-
telemetry.sdk.version="1.44.1"}},
164-
instrumentationScopeInfo=InstrumentationScopeInfo{
165-
name=io.opentelemetry.jetty-8.0,
166-
version=2.10.0-alpha,
167-
schemaUrl=null,
168-
attributes={}},
169-
name=GET /s3/createbucket/:bucketname,
170-
kind=SERVER,
171-
startEpochNanos=1733181524709878370,
172-
attributes={
173-
aws.local.operation="GET /s3/createbucket/:bucketname",
174-
aws.local.service="aws-sdk-v1",
175-
aws.span.kind="LOCAL_ROOT",
176-
client.address="172.22.0.1",
177-
http.request.method="GET",
178-
http.response.status_code=200,
179-
http.route="/s3/createbucket/:bucketname",
180-
network.peer.address="172.22.0.1",
181-
network.peer.port=55828,
182-
network.protocol.version="1.1",
183-
server.address="localhost",
184-
server.port=33887,
185-
thread.id=53,
186-
thread.name="qtp901050607-53",
187-
url.path="/s3/createbucket/create-bucket",
188-
url.scheme="http",
189-
user_agent.original="armeria/1.26.4"},
190-
events=[], links=[],
191-
status=ImmutableStatusData{statusCode=UNSET, description=},
192-
endEpochNanos=1733181527659649586,
193-
hasEnded=true,
194-
totalRecordedEvents=0,
195-
totalRecordedLinks=0,
196-
totalAttributeCount=17}]
48+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/base/AwsSdkBaseTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,18 +242,6 @@ private void assertSemanticConventionsAttributes(
242242
assertAttribute(SemanticConventionsConstants.HTTP_RESPONSE_STATUS_CODE, statusCode))
243243
.satisfiesOnlyOnce(assertAttributeStartsWith(SemanticConventionsConstants.URL_FULL, url))
244244
.satisfiesOnlyOnce(assertKeyIsPresent(SemanticConventionsConstants.THREAD_ID));
245-
// // Assertions based on awsSpanKind
246-
// if ("CLIENT".equals(awsSpanKind)) {
247-
// assertThat(attributesList)
248-
// .satisfiesOnlyOnce(assertAttribute(SemanticConventionsConstants.SERVER_ADDRESS,
249-
// address))
250-
// .satisfiesOnlyOnce(assertAttribute(SemanticConventionsConstants.SERVER_PORT, port));
251-
// } else if ("PRODUCER".equals(awsSpanKind)) {
252-
// assertThat(attributesList)
253-
// .satisfiesOnlyOnce(assertAttribute(SemanticConventionsConstants.CLIENT_ADDRESS,
254-
// address))
255-
// .satisfiesOnlyOnce(assertAttribute(SemanticConventionsConstants.CLIENT_PORT, port));
256-
// }
257245
}
258246

259247
/** All the spans of the AWS SDK Should have a RPC properties. */

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/v2/AwsSdkV2Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ void testBedrockAgentRuntimeAgentId() {
259259
doTestBedrockAgentRuntimeAgentId();
260260
}
261261

262-
// // TODO: Enable testBedrockAgentRuntimeKnowledgeBaseId test after KnowledgeBaseId is supported
263-
// in
262+
// TODO: Enable testBedrockAgentRuntimeKnowledgeBaseId test after KnowledgeBaseId is supported in
263+
// OTEL BedrockAgentRuntime instrumentation
264264
@Test
265265
void testBedrockAgentRuntimeKnowledgeBaseId() {
266266
doTestBedrockAgentRuntimeKnowledgeBaseId();

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/base/ContractTestBase.java

Lines changed: 27 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import com.linecorp.armeria.client.WebClient;
1919
import java.util.ArrayList;
20-
import java.util.HashMap;
2120
import java.util.List;
2221
import java.util.Map;
2322
import org.junit.jupiter.api.AfterAll;
@@ -135,50 +134,33 @@ protected int getApplicationPort() {
135134
}
136135

137136
protected Map<String, String> getApplicationEnvironmentVariables() {
138-
Map<String, String> envVars = new HashMap<>();
139-
envVars.put("JAVA_TOOL_OPTIONS", "-javaagent:" + MOUNT_PATH);
140-
envVars.put("OTEL_METRIC_EXPORT_INTERVAL", "100"); // 100 ms
141-
envVars.put("OTEL_AWS_APPLICATION_SIGNALS_ENABLED", "true");
142-
envVars.put("OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED", isRuntimeEnabled());
143-
envVars.put("OTEL_METRICS_EXPORTER", "none");
144-
envVars.put("OTEL_BSP_SCHEDULE_DELAY", "0"); // Don't wait to export spans to the collector
145-
envVars.put("OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", COLLECTOR_HTTP_ENDPOINT);
146-
envVars.put("OTEL_EXPORTER_OTLP_ENDPOINT", COLLECTOR_HTTP_ENDPOINT);
147-
envVars.put("OTEL_RESOURCE_ATTRIBUTES", getApplicationOtelResourceAttributes());
148-
envVars.put("OTEL_EXPORTER_OTLP_PROTOCOL", "grpc");
149-
// envVars.put("OTEL_INSTRUMENTATION_NETTY_CONNECTION_TELEMETRY_ENABLED", "true");
150-
return envVars;
151-
}
152-
153-
// protected Map<String, String> getApplicationEnvironmentVariables() {
154-
// return Map.of(
155-
// "JAVA_TOOL_OPTIONS",
156-
// "-javaagent:" + MOUNT_PATH,
157-
// "OTEL_METRIC_EXPORT_INTERVAL",
158-
// "100", // 100 ms
159-
// "OTEL_AWS_APPLICATION_SIGNALS_ENABLED",
160-
// "true",
161-
// "OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED",
162-
// isRuntimeEnabled(),
163-
// "OTEL_METRICS_EXPORTER",
164-
// "none",
165-
// "OTEL_BSP_SCHEDULE_DELAY",
166-
// "0", // Don't wait to export spans to the collector
167-
// "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT",
168-
// COLLECTOR_HTTP_ENDPOINT,
169-
// "OTEL_EXPORTER_OTLP_ENDPOINT",
170-
// COLLECTOR_HTTP_ENDPOINT,
171-
// "OTEL_RESOURCE_ATTRIBUTES",
172-
// getApplicationOtelResourceAttributes(),
173-
// // The default OTLP protocol has been changed from grpc to http/protobuf in
174-
// order
175-
// // to align with the specification. You can switch to the grpc protocol using
176-
// // OTEL_EXPORTER_OTLP_PROTOCOL=grpc or -Dotel.exporter.otlp.protocol=grpc.
177-
// "OTEL_EXPORTER_OTLP_PROTOCOL",
178-
// "grpc",
179-
// "OTEL_INSTRUMENTATION_NETTY_CONNECTION_TELEMETRY_ENABLED",
180-
// "true");
181-
// }
137+
return Map.of(
138+
"JAVA_TOOL_OPTIONS",
139+
"-javaagent:" + MOUNT_PATH,
140+
"OTEL_METRIC_EXPORT_INTERVAL",
141+
"100", // 100 ms
142+
"OTEL_AWS_APPLICATION_SIGNALS_ENABLED",
143+
"true",
144+
"OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED",
145+
isRuntimeEnabled(),
146+
"OTEL_METRICS_EXPORTER",
147+
"none",
148+
"OTEL_BSP_SCHEDULE_DELAY",
149+
"0", // Don't wait to export spans to the collector
150+
"OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT",
151+
COLLECTOR_HTTP_ENDPOINT,
152+
"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT",
153+
COLLECTOR_HTTP_ENDPOINT,
154+
"OTEL_RESOURCE_ATTRIBUTES",
155+
getApplicationOtelResourceAttributes(),
156+
// // The default OTLP protocol has been changed from grpc to
157+
// http/protobuf in
158+
// order
159+
// // to align with the specification. You can switch to the grpc protocol using
160+
// // OTEL_EXPORTER_OTLP_PROTOCOL=grpc or -Dotel.exporter.otlp.protocol=grpc.
161+
"OTEL_EXPORTER_OTLP_PROTOCOL",
162+
"grpc");
163+
}
182164

183165
protected Map<String, String> getApplicationExtraEnvironmentVariables() {
184166
return Map.of();

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/base/JMXMetricsContractTestBase.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ private void assertGreaterThanOrEqual(List<NumberDataPoint> dps, long threshold)
7575
assertDataPoints(dps, (value) -> assertThat(value).isGreaterThanOrEqualTo(threshold));
7676
}
7777

78-
// private void assertDataPoints(List<NumberDataPoint> dps, Consumer<Long> consumer) {
79-
// dps.forEach(datapoint -> {
80-
// long value = datapoint.getAsInt();
81-
// System.out.println("Data point value!!!!!!!: " + value); // Print each value
82-
// consumer.accept(value); // Retain original logic
83-
// });
84-
// }
85-
8678
private void assertDataPoints(List<NumberDataPoint> dps, Consumer<Long> consumer) {
8779
dps.forEach(datapoint -> consumer.accept(datapoint.getAsInt()));
8880
}

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/kafka/consumers/KafkaConsumersTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected void assertSemanticConventionsSpanAttributes(
126126
.isEqualTo(String.format("%s process", kafkaTopic));
127127
assertThat(rss.getSpan().getStatus().getCode().equals(otelStatusCode));
128128
var attributesList = rss.getSpan().getAttributesList();
129-
// assertSemanticConventionsAttributes(attributesList, kafkaTopic);
129+
assertSemanticConventionsAttributes(attributesList, kafkaTopic);
130130
});
131131
}
132132

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/utils/MockCollectorClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* The mock collector client is used to interact with the Mock collector image, used in the tests.
5151
*/
5252
public class MockCollectorClient {
53-
private final TemporalAmount TIMEOUT_DELAY = Duration.of(120, ChronoUnit.SECONDS);
53+
private final TemporalAmount TIMEOUT_DELAY = Duration.of(20, ChronoUnit.SECONDS);
5454
private static final Logger logger = LoggerFactory.getLogger(MockCollectorClient.class);
5555

5656
private static final TypeReference<List<ExportTraceServiceRequest>>

0 commit comments

Comments
 (0)