Fix grizzly instrumentation
@@ -61,16 +61,16 @@ public class GrizzlyHttpServerTracer
protected URI url(final HttpRequestPacket httpRequest) throws URISyntaxException {
return new URI(
(httpRequest.isSecure() ? "https://" : "http://")
- + httpRequest.getRemoteHost()
+ + httpRequest.serverName()
+ ":"
- + httpRequest.getLocalPort()
+ + httpRequest.getServerPort()
+ httpRequest.getRequestURI()
+ (httpRequest.getQueryString() != null ? "?" + httpRequest.getQueryString() : ""));
}
@Override
protected String peerHostIP(final HttpRequestPacket httpRequest) {
- return httpRequest.getLocalHost();
+ return httpRequest.getRemoteAddress();
}
@Override
@@ -95,6 +95,6 @@ public class GrizzlyHttpServerTracer
@Override
protected Integer peerPort(final HttpRequestPacket httpRequest) {
- return httpRequest.getLocalPort();
+ return httpRequest.getRemotePort();
}
}
