diff --git a/instrumentation/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy b/instrumentation/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy index 9fbeec74e8..5dfe780fa5 100644 --- a/instrumentation/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy +++ b/instrumentation/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy @@ -117,8 +117,7 @@ abstract class AbstractRatpackRoutesTest extends InstrumentationSpecification { if (extraAttributes.contains(SemanticAttributes.HTTP_URL)) { "$SemanticAttributes.HTTP_URL" "http://localhost:${app.bindPort}/${path}" } else { - // TODO netty does not set http.scheme - refactor HTTP server tests so that it's possible to specify extracted attributes, like in HTTP client tests - "$SemanticAttributes.HTTP_SCHEME" { it == "http" || it == null } + "$SemanticAttributes.HTTP_SCHEME" "http" "$SemanticAttributes.HTTP_HOST" "localhost:${app.bindPort}" "$SemanticAttributes.HTTP_TARGET" "/$path" } diff --git a/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy b/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy index 03035b3eb6..6aa835b55e 100644 --- a/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy +++ b/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy @@ -666,8 +666,7 @@ abstract class HttpServerTest extends InstrumentationSpecification imple "$SemanticAttributes.HTTP_USER_AGENT" TEST_USER_AGENT "$SemanticAttributes.HTTP_HOST" { it == "localhost" || it == "localhost:${port}" } - // TODO netty does not set http.scheme - refactor HTTP server tests so that it's possible to specify extracted attributes, like in HTTP client tests - "$SemanticAttributes.HTTP_SCHEME" { it == "http" || it == null } + "$SemanticAttributes.HTTP_SCHEME" "http" "$SemanticAttributes.HTTP_TARGET" endpoint.resolvePath(address).getPath() + "${endpoint == QUERY_PARAM ? "?${endpoint.body}" : ""}" if (extraAttributes.contains(SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH)) {