Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val DEPENDENCY_BOMS = listOf(

val autoServiceVersion = "1.1.1"
val autoValueVersion = "1.11.0"
val errorProneVersion = "2.41.0"
val errorProneVersion = "2.42.0"
val byteBuddyVersion = "1.17.7"
val asmVersion = "9.8"
val jmhVersion = "1.37"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,37 @@ protected void configure() {

@Singleton
@Provides
RatpackClientTelemetry ratpackClientTelemetry(OpenTelemetry openTelemetry) {
static RatpackClientTelemetry ratpackClientTelemetry(OpenTelemetry openTelemetry) {
return RatpackClientTelemetry.create(openTelemetry);
}

@Singleton
@Provides
RatpackServerTelemetry ratpackServerTelemetry(OpenTelemetry openTelemetry) {
static RatpackServerTelemetry ratpackServerTelemetry(OpenTelemetry openTelemetry) {
return RatpackServerTelemetry.create(openTelemetry);
}

@Singleton
@Provides
Handler ratpackServerHandler(RatpackServerTelemetry ratpackTracing) {
static Handler ratpackServerHandler(RatpackServerTelemetry ratpackTracing) {
return ratpackTracing.getHandler();
}

@Singleton
@Provides
ExecInterceptor ratpackExecInterceptor(RatpackServerTelemetry ratpackTracing) {
static ExecInterceptor ratpackExecInterceptor(RatpackServerTelemetry ratpackTracing) {
return ratpackTracing.getExecInterceptor();
}

@Singleton
@Provides
HttpClient instrumentedHttpClient(RatpackClientTelemetry ratpackTracing) throws Exception {
static HttpClient instrumentedHttpClient(RatpackClientTelemetry ratpackTracing) throws Exception {
return ratpackTracing.instrument(HttpClient.of(spec -> {}));
}

@Singleton
@Provides
ExecInitializer ratpackExecInitializer(RatpackServerTelemetry ratpackTracing) {
static ExecInitializer ratpackExecInitializer(RatpackServerTelemetry ratpackTracing) {
return ratpackTracing.getExecInitializer();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class AbstractSpringServerTest extends AbstractRestletServerTest
protected void setupServer(Component component) {
ApplicationContext context = new ClassPathXmlApplicationContext(getConfigurationName());
router = (Router) context.getBean("testRouter");
Server server = (Server) context.getBean("testServer", new Object[] {"http", port});
Server server = (Server) context.getBean("testServer", "http", port);
component.getServers().add(server);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.instrumentation.testing.junit.http;

import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.CAPTURE_HEADERS;
import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.CAPTURE_PARAMETERS;
import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.ERROR;
Expand All @@ -16,6 +17,7 @@
import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.SUCCESS;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
import static java.util.Collections.singletonList;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

Expand Down Expand Up @@ -899,14 +901,17 @@ protected SpanDataAssert assertServerSpan(

if (endpoint == CAPTURE_HEADERS) {
assertThat(attrs)
.containsEntry("http.request.header.x-test-request", new String[] {"test"});
.containsEntry(
stringArrayKey("http.request.header.x-test-request"), singletonList("test"));
assertThat(attrs)
.containsEntry("http.response.header.x-test-response", new String[] {"test"});
.containsEntry(
stringArrayKey("http.response.header.x-test-response"), singletonList("test"));
}
if (endpoint == CAPTURE_PARAMETERS) {
assertThat(attrs)
.containsEntry(
"servlet.request.parameter.test-parameter", new String[] {"test value õäöü"});
stringArrayKey("servlet.request.parameter.test-parameter"),
singletonList("test value õäöü"));
}
});

Expand Down
Loading