Update tests now that netty captures http.scheme
MODIFY
instrumentation/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy
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"
}

MODIFY
testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy
testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy
@@ -666,8 +666,7 @@ abstract class HttpServerTest<SERVER> 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)) {

Update tests now that netty captures http.scheme (#4807)