Update tests to verify NET_PEER_NAME is never captured for http server spans

This commit is contained in:
Trask Stalnaker 2022-02-17 12:07:00 -08:00
parent 0d6b4ddf5a
commit 44c9e91048
1 changed files with 0 additions and 9 deletions

View File

@ -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) }
}