Skip to content

Commit b89c85b

Browse files
committed
Finish all modifications.
1 parent 6dbacf5 commit b89c85b

File tree

28 files changed

+1582
-890
lines changed

28 files changed

+1582
-890
lines changed

.github/patches/opentelemetry-java-instrumentation.patch

Lines changed: 1230 additions & 561 deletions
Large diffs are not rendered by default.

.github/patches/versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
OTEL_JAVA_INSTRUMENTATION_VERSION=v1.33.6
1+
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.10.0

appsignals-tests/contract-tests/src/test/java/software/amazon/opentelemetry/appsignals/test/awssdk/v1/AwsSdkV1Test.java

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -200,64 +200,64 @@ void testKinsesisError() throws Exception {
200200
void testKinesisFault() throws Exception {
201201
doTestKinesisFault();
202202
}
203-
//
204-
// @Test
205-
// void testBedrockAgentGetKnowledgeBaseId() {
206-
// doTestBedrockAgentKnowledgeBaseId();
207-
// }
208-
//
209-
// @Test
210-
// void testBedrockAgentAgentId() {
211-
// doTestBedrockAgentAgentId();
212-
// }
213-
//
214-
// @Test
215-
// void testBedrockAgentDataSourceId() {
216-
// doTestBedrockAgentDataSourceId();
217-
// }
218-
//
219-
// @Test
220-
// void testBedrockRuntimeAmazonTitan() {
221-
// doTestBedrockRuntimeAmazonTitan();
222-
// }
223-
//
224-
// @Test
225-
// void testBedrockRuntimeAi21Jamba() {
226-
// doTestBedrockRuntimeAi21Jamba();
227-
// }
228-
//
229-
// @Test
230-
// void testBedrockRuntimeAnthropicClaude() {
231-
// doTestBedrockRuntimeAnthropicClaude();
232-
// }
233-
//
234-
// @Test
235-
// void testBedrockRuntimeCohereCommandR() {
236-
// doTestBedrockRuntimeCohereCommandR();
237-
// }
238-
//
239-
// @Test
240-
// void testBedrockRuntimeMetaLlama() {
241-
// doTestBedrockRuntimeMetaLlama();
242-
// }
243-
//
244-
// @Test
245-
// void testBedrockRuntimeMistral() {
246-
// doTestBedrockRuntimeMistral();
247-
// }
248-
//
249-
// @Test
250-
// void testBedrockGuardrailId() {
251-
// doTestBedrockGuardrailId();
252-
// }
253-
//
254-
// @Test
255-
// void testBedrockAgentRuntimeAgentId() {
256-
// doTestBedrockAgentRuntimeAgentId();
257-
// }
258-
//
259-
// @Test
260-
// void testBedrockAgentRuntimeKnowledgeBaseId() {
261-
// doTestBedrockAgentRuntimeKnowledgeBaseId();
262-
// }
203+
204+
@Test
205+
void testBedrockAgentGetKnowledgeBaseId() {
206+
doTestBedrockAgentKnowledgeBaseId();
207+
}
208+
209+
@Test
210+
void testBedrockAgentAgentId() {
211+
doTestBedrockAgentAgentId();
212+
}
213+
214+
@Test
215+
void testBedrockAgentDataSourceId() {
216+
doTestBedrockAgentDataSourceId();
217+
}
218+
219+
@Test
220+
void testBedrockRuntimeAmazonTitan() {
221+
doTestBedrockRuntimeAmazonTitan();
222+
}
223+
224+
@Test
225+
void testBedrockRuntimeAi21Jamba() {
226+
doTestBedrockRuntimeAi21Jamba();
227+
}
228+
229+
@Test
230+
void testBedrockRuntimeAnthropicClaude() {
231+
doTestBedrockRuntimeAnthropicClaude();
232+
}
233+
234+
@Test
235+
void testBedrockRuntimeCohereCommandR() {
236+
doTestBedrockRuntimeCohereCommandR();
237+
}
238+
239+
@Test
240+
void testBedrockRuntimeMetaLlama() {
241+
doTestBedrockRuntimeMetaLlama();
242+
}
243+
244+
@Test
245+
void testBedrockRuntimeMistral() {
246+
doTestBedrockRuntimeMistral();
247+
}
248+
249+
@Test
250+
void testBedrockGuardrailId() {
251+
doTestBedrockGuardrailId();
252+
}
253+
254+
@Test
255+
void testBedrockAgentRuntimeAgentId() {
256+
doTestBedrockAgentRuntimeAgentId();
257+
}
258+
259+
@Test
260+
void testBedrockAgentRuntimeKnowledgeBaseId() {
261+
doTestBedrockAgentRuntimeKnowledgeBaseId();
262+
}
263263
}

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

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -204,65 +204,65 @@ void testKinesisFault() throws Exception {
204204
doTestKinesisFault();
205205
}
206206

207-
// @Test
208-
// void testBedrockAgentGetKnowlesgeBaseId() {
209-
// doTestBedrockAgentKnowledgeBaseId();
210-
// }
211-
//
212-
// @Test
213-
// void testBedrockAgentAgentId() {
214-
// doTestBedrockAgentAgentId();
215-
// }
216-
//
217-
// @Test
218-
// void testBedrockAgentDataSourceId() {
219-
// doTestBedrockAgentDataSourceId();
220-
// }
221-
//
222-
// @Test
223-
// void testBedrockRuntimeAmazonTitan() {
224-
// doTestBedrockRuntimeAmazonTitan();
225-
// }
226-
//
227-
// @Test
228-
// void testBedrockRuntimeAi21Jamba() {
229-
// doTestBedrockRuntimeAi21Jamba();
230-
// }
231-
//
232-
// @Test
233-
// void testBedrockRuntimeAnthropicClaude() {
234-
// doTestBedrockRuntimeAnthropicClaude();
235-
// }
236-
//
237-
// @Test
238-
// void testBedrockRuntimeCohereCommandR() {
239-
// doTestBedrockRuntimeCohereCommandR();
240-
// }
241-
//
242-
// @Test
243-
// void testBedrockRuntimeMetaLlama() {
244-
// doTestBedrockRuntimeMetaLlama();
245-
// }
246-
//
247-
// @Test
248-
// void testBedrockRuntimeMistral() {
249-
// doTestBedrockRuntimeMistral();
250-
// }
251-
//
252-
// @Test
253-
// void testBedrockGuardrailId() {
254-
// doTestBedrockGuardrailId();
255-
// }
256-
//
257-
// @Test
258-
// void testBedrockAgentRuntimeAgentId() {
259-
// doTestBedrockAgentRuntimeAgentId();
260-
// }
261-
//
207+
@Test
208+
void testBedrockAgentGetKnowlesgeBaseId() {
209+
doTestBedrockAgentKnowledgeBaseId();
210+
}
211+
212+
@Test
213+
void testBedrockAgentAgentId() {
214+
doTestBedrockAgentAgentId();
215+
}
216+
217+
@Test
218+
void testBedrockAgentDataSourceId() {
219+
doTestBedrockAgentDataSourceId();
220+
}
221+
222+
@Test
223+
void testBedrockRuntimeAmazonTitan() {
224+
doTestBedrockRuntimeAmazonTitan();
225+
}
226+
227+
@Test
228+
void testBedrockRuntimeAi21Jamba() {
229+
doTestBedrockRuntimeAi21Jamba();
230+
}
231+
232+
@Test
233+
void testBedrockRuntimeAnthropicClaude() {
234+
doTestBedrockRuntimeAnthropicClaude();
235+
}
236+
237+
@Test
238+
void testBedrockRuntimeCohereCommandR() {
239+
doTestBedrockRuntimeCohereCommandR();
240+
}
241+
242+
@Test
243+
void testBedrockRuntimeMetaLlama() {
244+
doTestBedrockRuntimeMetaLlama();
245+
}
246+
247+
@Test
248+
void testBedrockRuntimeMistral() {
249+
doTestBedrockRuntimeMistral();
250+
}
251+
252+
@Test
253+
void testBedrockGuardrailId() {
254+
doTestBedrockGuardrailId();
255+
}
256+
257+
@Test
258+
void testBedrockAgentRuntimeAgentId() {
259+
doTestBedrockAgentRuntimeAgentId();
260+
}
261+
262262
// // TODO: Enable testBedrockAgentRuntimeKnowledgeBaseId test after KnowledgeBaseId is supported
263263
// in
264-
// @Test
265-
// void testBedrockAgentRuntimeKnowledgeBaseId() {
266-
// doTestBedrockAgentRuntimeKnowledgeBaseId();
267-
// }
264+
@Test
265+
void testBedrockAgentRuntimeKnowledgeBaseId() {
266+
doTestBedrockAgentRuntimeKnowledgeBaseId();
267+
}
268268
}

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

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
import com.linecorp.armeria.client.WebClient;
1919
import java.util.ArrayList;
20+
import java.util.HashMap;
2021
import java.util.List;
2122
import java.util.Map;
22-
import java.util.HashMap;
2323
import org.junit.jupiter.api.AfterAll;
2424
import org.junit.jupiter.api.AfterEach;
2525
import org.junit.jupiter.api.BeforeAll;
@@ -146,38 +146,39 @@ protected Map<String, String> getApplicationEnvironmentVariables() {
146146
envVars.put("OTEL_EXPORTER_OTLP_ENDPOINT", COLLECTOR_HTTP_ENDPOINT);
147147
envVars.put("OTEL_RESOURCE_ATTRIBUTES", getApplicationOtelResourceAttributes());
148148
envVars.put("OTEL_EXPORTER_OTLP_PROTOCOL", "grpc");
149-
// envVars.put("OTEL_INSTRUMENTATION_NETTY_CONNECTION_TELEMETRY_ENABLED", "true");
149+
// envVars.put("OTEL_INSTRUMENTATION_NETTY_CONNECTION_TELEMETRY_ENABLED", "true");
150150
return envVars;
151151
}
152152

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 order
174-
// // to align with the specification. You can switch to the grpc protocol using
175-
// // OTEL_EXPORTER_OTLP_PROTOCOL=grpc or -Dotel.exporter.otlp.protocol=grpc.
176-
// "OTEL_EXPORTER_OTLP_PROTOCOL",
177-
// "grpc",
178-
// "OTEL_INSTRUMENTATION_NETTY_CONNECTION_TELEMETRY_ENABLED",
179-
// "true");
180-
// }
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+
// }
181182

182183
protected Map<String, String> getApplicationExtraEnvironmentVariables() {
183184
return Map.of();

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ 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+
7886
private void assertDataPoints(List<NumberDataPoint> dps, Consumer<Long> consumer) {
7987
dps.forEach(datapoint -> consumer.accept(datapoint.getAsInt()));
8088
}

0 commit comments

Comments
 (0)