Resolves the remote ip when behind proxy; fixes gh-1683
This commit is contained in:
@@ -330,6 +330,14 @@ public final class TraceWebFilter implements WebFilter, Ordered {
|
||||
|
||||
@Override
|
||||
public boolean parseClientIpAndPort(Span span) {
|
||||
boolean clientIpAndPortParsed = super.parseClientIpAndPort(span);
|
||||
if (clientIpAndPortParsed) {
|
||||
return true;
|
||||
}
|
||||
return resolveFromInetAddress(span);
|
||||
}
|
||||
|
||||
private boolean resolveFromInetAddress(Span span) {
|
||||
InetSocketAddress addr = delegate.getRemoteAddress();
|
||||
if (addr == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user