Update tests to verify NET_PEER_NAME is never captured for http server spans
This commit is contained in:
parent
0d6b4ddf5a
commit
44c9e91048
|
@ -167,7 +167,6 @@ abstract class HttpServerTest<SERVER> extends InstrumentationSpecification imple
|
|||
[
|
||||
SemanticAttributes.HTTP_ROUTE,
|
||||
SemanticAttributes.NET_TRANSPORT,
|
||||
SemanticAttributes.NET_PEER_NAME,
|
||||
SemanticAttributes.NET_PEER_PORT
|
||||
] as Set
|
||||
}
|
||||
|
@ -695,10 +694,6 @@ abstract class HttpServerTest<SERVER> extends InstrumentationSpecification imple
|
|||
if (httpAttributes.contains(SemanticAttributes.NET_TRANSPORT)) {
|
||||
"$SemanticAttributes.NET_TRANSPORT" IP_TCP
|
||||
}
|
||||
if (httpAttributes.contains(SemanticAttributes.NET_PEER_NAME)) {
|
||||
// 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" { it == null || it == address.host }
|
||||
}
|
||||
if (httpAttributes.contains(SemanticAttributes.NET_PEER_PORT)) {
|
||||
"$SemanticAttributes.NET_PEER_PORT" { (it instanceof Long && it.intValue() != port) }
|
||||
}
|
||||
|
@ -760,10 +755,6 @@ abstract class HttpServerTest<SERVER> extends InstrumentationSpecification imple
|
|||
if (httpAttributes.contains(SemanticAttributes.NET_TRANSPORT)) {
|
||||
"$SemanticAttributes.NET_TRANSPORT" IP_TCP
|
||||
}
|
||||
if (httpAttributes.contains(SemanticAttributes.NET_PEER_NAME)) {
|
||||
// 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" { it == null || it == address.host }
|
||||
}
|
||||
if (httpAttributes.contains(SemanticAttributes.NET_PEER_PORT)) {
|
||||
"$SemanticAttributes.NET_PEER_PORT" { (it instanceof Long && it.intValue() != port) }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue