Fix some tests on windows (#4288)
This commit is contained in:
parent
90c0df9328
commit
d2b7786027
|
@ -137,8 +137,8 @@ abstract class AbstractGrpcStreamingTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "Conversation"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.OK.code.value()
|
||||
|
|
|
@ -141,8 +141,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.Code.OK.value()
|
||||
|
@ -261,8 +261,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.Code.OK.value()
|
||||
|
@ -394,8 +394,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.Code.OK.value()
|
||||
|
@ -487,8 +487,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE}" grpcStatus.code.value()
|
||||
|
@ -585,8 +585,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
}
|
||||
|
@ -765,8 +765,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.OK.code.value()
|
||||
|
@ -896,8 +896,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
}
|
||||
|
@ -1010,8 +1010,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "grpc.reflection.v1alpha.ServerReflection"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "ServerReflectionInfo"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.OK.code.value()
|
||||
|
@ -1118,7 +1118,8 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
|
|||
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
|
||||
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
|
||||
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_PEER_PORT.key}" Long
|
||||
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.Code.OK.value()
|
||||
|
|
|
@ -145,8 +145,8 @@ class UndertowServerTest extends HttpServerTest<Undertow> implements AgentTestTr
|
|||
"${SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH}" Long
|
||||
"${SemanticAttributes.HTTP_SCHEME}" "http"
|
||||
"${SemanticAttributes.HTTP_TARGET}" "/sendResponse"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_TRANSPORT}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
}
|
||||
}
|
||||
|
@ -200,8 +200,8 @@ class UndertowServerTest extends HttpServerTest<Undertow> implements AgentTestTr
|
|||
"${SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH}" Long
|
||||
"${SemanticAttributes.HTTP_SCHEME}" "http"
|
||||
"${SemanticAttributes.HTTP_TARGET}" "/sendResponseWithException"
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
"${SemanticAttributes.NET_TRANSPORT}" SemanticAttributes.NetTransportValues.IP_TCP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -598,8 +598,8 @@ abstract class HttpServerTest<SERVER> extends InstrumentationSpecification imple
|
|||
"${SemanticAttributes.HTTP_SERVER_NAME}" String
|
||||
}
|
||||
if (extraAttributes.contains(SemanticAttributes.NET_PEER_NAME)) {
|
||||
// "localhost" on linux, "127.0.0.1" on windows
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == "127.0.0.1" }
|
||||
// net.peer.name resolves to "127.0.0.1" on windows which is same as net.peer.ip so then not captured
|
||||
"${SemanticAttributes.NET_PEER_NAME.key}" { it == "localhost" || it == null }
|
||||
}
|
||||
if (extraAttributes.contains(SemanticAttributes.NET_TRANSPORT)) {
|
||||
"${SemanticAttributes.NET_TRANSPORT}" IP_TCP
|
||||
|
|
Loading…
Reference in New Issue