test_class.declarator: configuration
test_class.modifier: private
test_class.original_string: private ConfigurationRegistry configuration;
test_class.type: ConfigurationRegistry
test_class.var_name: configuration
test_class.declarator: tracer
test_class.modifier: private
test_class.original_string: private io.opentracing.mock.MockTracer tracer;
test_class.type: io.opentracing.mock.MockTracer
test_class.var_name: tracer
test_class.declarator: servletPlugin
test_class.modifier: private
test_class.original_string: private ServletPlugin servletPlugin;
test_class.type: ServletPlugin
test_class.var_name: servletPlugin
test_class.file: stagemonitor-web-servlet/src/test/java/org/stagemonitor/web/servlet/MonitoredHttpRequestTest.java
test_class.identifier: MonitoredHttpRequestTest
test_case.body: @Test
  	public void testGetClientIp() {
  		final MockHttpServletRequest request = new MockHttpServletRequest();
  		request.setRemoteAddr("10.1.1.3");
  		request.addHeader("x-forwarded-for", "10.1.1.1, 10.1.1.2, 10.1.1.3");
  		assertThat(MonitoredHttpRequest.getClientIp(request)).isEqualTo("10.1.1.1");
  	}
test_case.class_method_signature: MonitoredHttpRequestTest.testGetClientIp()
test_case.full_signature: @Test public void testGetClientIp()
test_case.identifier: testGetClientIp
test_case.invocations: setRemoteAddr addHeader isEqualTo assertThat getClientIp
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetClientIp()
focal_class.declarator: logger = LoggerFactory.getLogger(MonitoredHttpRequest.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(MonitoredHttpRequest.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: CONNECTION_ID_ATTRIBUTE = "connectionId"
focal_class.modifier: public static final
focal_class.original_string: public static final String CONNECTION_ID_ATTRIBUTE = "connectionId";
focal_class.type: String
focal_class.var_name: CONNECTION_ID_ATTRIBUTE
focal_class.declarator: WIDGET_ALLOWED_ATTRIBUTE = "showWidgetAllowed"
focal_class.modifier: public static final
focal_class.original_string: public static final String WIDGET_ALLOWED_ATTRIBUTE = "showWidgetAllowed";
focal_class.type: String
focal_class.var_name: WIDGET_ALLOWED_ATTRIBUTE
focal_class.declarator: MONITORED_HTTP_REQUEST_ATTRIBUTE = "MonitoredHttpRequest"
focal_class.modifier: public static final
focal_class.original_string: public static final String MONITORED_HTTP_REQUEST_ATTRIBUTE = "MonitoredHttpRequest";
focal_class.type: String
focal_class.var_name: MONITORED_HTTP_REQUEST_ATTRIBUTE
focal_class.declarator: USER_AGENT_PARSED_FUTURE_ATTRIBUTE = MonitoredHttpRequest.class.getName() + ".userAgentParsedFuture"
focal_class.modifier: public static final
focal_class.original_string: public static final String USER_AGENT_PARSED_FUTURE_ATTRIBUTE = MonitoredHttpRequest.class.getName() + ".userAgentParsedFuture";
focal_class.type: String
focal_class.var_name: USER_AGENT_PARSED_FUTURE_ATTRIBUTE
focal_class.declarator: userAgentParser
focal_class.modifier: private static
focal_class.original_string: private static UserAgentParser userAgentParser;
focal_class.type: UserAgentParser
focal_class.var_name: userAgentParser
focal_class.declarator: httpServletRequest
focal_class.modifier: protected final
focal_class.original_string: protected final HttpServletRequest httpServletRequest;
focal_class.type: HttpServletRequest
focal_class.var_name: httpServletRequest
focal_class.declarator: filterChain
focal_class.modifier: protected final
focal_class.original_string: protected final FilterChain filterChain;
focal_class.type: FilterChain
focal_class.var_name: filterChain
focal_class.declarator: responseWrapper
focal_class.modifier: protected final
focal_class.original_string: protected final StatusExposingByteCountingServletResponse responseWrapper;
focal_class.type: StatusExposingByteCountingServletResponse
focal_class.var_name: responseWrapper
focal_class.declarator: servletPlugin
focal_class.modifier: protected final
focal_class.original_string: protected final ServletPlugin servletPlugin;
focal_class.type: ServletPlugin
focal_class.var_name: servletPlugin
focal_class.declarator: tracingPlugin
focal_class.modifier: private final
focal_class.original_string: private final TracingPlugin tracingPlugin;
focal_class.type: TracingPlugin
focal_class.var_name: tracingPlugin
focal_class.declarator: userAgentHeader
focal_class.modifier: private final
focal_class.original_string: private final String userAgentHeader;
focal_class.type: String
focal_class.var_name: userAgentHeader
focal_class.declarator: connectionId
focal_class.modifier: private final
focal_class.original_string: private final String connectionId;
focal_class.type: String
focal_class.var_name: connectionId
focal_class.declarator: widgetAndStagemonitorEndpointsAllowed
focal_class.modifier: private final
focal_class.original_string: private final boolean widgetAndStagemonitorEndpointsAllowed;
focal_class.type: boolean
focal_class.var_name: widgetAndStagemonitorEndpointsAllowed
focal_class.declarator: clientIp
focal_class.modifier: private final
focal_class.original_string: private final String clientIp;
focal_class.type: String
focal_class.var_name: clientIp
focal_class.declarator: userAgentParsingExecutor
focal_class.modifier: private final
focal_class.original_string: private final ExecutorService userAgentParsingExecutor;
focal_class.type: ExecutorService
focal_class.var_name: userAgentParsingExecutor
focal_class.file: stagemonitor-web-servlet/src/main/java/org/stagemonitor/web/servlet/MonitoredHttpRequest.java
focal_class.identifier: MonitoredHttpRequest
focal_class.class_method_signature: MonitoredHttpRequest.MonitoredHttpRequest(HttpServletRequest httpServletRequest,
  								StatusExposingByteCountingServletResponse responseWrapper,
  								FilterChain filterChain, ConfigurationRegistry configuration, ExecutorService userAgentParsingExecutor)
focal_class.full_signature: public  MonitoredHttpRequest(HttpServletRequest httpServletRequest,
  								StatusExposingByteCountingServletResponse responseWrapper,
  								FilterChain filterChain, ConfigurationRegistry configuration, ExecutorService userAgentParsingExecutor)
focal_class.identifier: MonitoredHttpRequest
focal_class.modifiers: public
focal_class.parameters: (HttpServletRequest httpServletRequest,
  								StatusExposingByteCountingServletResponse responseWrapper,
  								FilterChain filterChain, ConfigurationRegistry configuration, ExecutorService userAgentParsingExecutor)
focal_class.signature:  MonitoredHttpRequest(HttpServletRequest httpServletRequest,
  								StatusExposingByteCountingServletResponse responseWrapper,
  								FilterChain filterChain, ConfigurationRegistry configuration, ExecutorService userAgentParsingExecutor)
focal_class.class_method_signature: MonitoredHttpRequest.createSpan()
focal_class.full_signature: @Override public Span createSpan()
focal_class.identifier: createSpan
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Span
focal_class.signature: Span createSpan()
focal_class.class_method_signature: MonitoredHttpRequest.parseUserAgentAsync(final Span span, SpanContextInformation info)
focal_class.full_signature: private void parseUserAgentAsync(final Span span, SpanContextInformation info)
focal_class.identifier: parseUserAgentAsync
focal_class.modifiers: private
focal_class.parameters: (final Span span, SpanContextInformation info)
focal_class.return: void
focal_class.signature: void parseUserAgentAsync(final Span span, SpanContextInformation info)
focal_class.class_method_signature: MonitoredHttpRequest.getReferringSite()
focal_class.full_signature: private String getReferringSite()
focal_class.identifier: getReferringSite
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getReferringSite()
focal_class.class_method_signature: MonitoredHttpRequest.getClientIp(HttpServletRequest request)
focal_class.full_signature: public static String getClientIp(HttpServletRequest request)
focal_class.identifier: getClientIp
focal_class.modifiers: public static
focal_class.parameters: (HttpServletRequest request)
focal_class.return: String
focal_class.signature: String getClientIp(HttpServletRequest request)
focal_class.class_method_signature: MonitoredHttpRequest.getFirstIp(String ip)
focal_class.full_signature: private static String getFirstIp(String ip)
focal_class.identifier: getFirstIp
focal_class.modifiers: private static
focal_class.parameters: (String ip)
focal_class.return: String
focal_class.signature: String getFirstIp(String ip)
focal_class.class_method_signature: MonitoredHttpRequest.getIpFromHeaderIfNotAlreadySet(String header, HttpServletRequest request, String ip)
focal_class.full_signature: private static String getIpFromHeaderIfNotAlreadySet(String header, HttpServletRequest request, String ip)
focal_class.identifier: getIpFromHeaderIfNotAlreadySet
focal_class.modifiers: private static
focal_class.parameters: (String header, HttpServletRequest request, String ip)
focal_class.return: String
focal_class.signature: String getIpFromHeaderIfNotAlreadySet(String header, HttpServletRequest request, String ip)
focal_class.class_method_signature: MonitoredHttpRequest.getRequestName()
focal_class.full_signature: public String getRequestName()
focal_class.identifier: getRequestName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRequestName()
focal_class.class_method_signature: MonitoredHttpRequest.getRequestNameByRequest(HttpServletRequest request, ServletPlugin servletPlugin)
focal_class.full_signature: public static String getRequestNameByRequest(HttpServletRequest request, ServletPlugin servletPlugin)
focal_class.identifier: getRequestNameByRequest
focal_class.modifiers: public static
focal_class.parameters: (HttpServletRequest request, ServletPlugin servletPlugin)
focal_class.return: String
focal_class.signature: String getRequestNameByRequest(HttpServletRequest request, ServletPlugin servletPlugin)
focal_class.class_method_signature: MonitoredHttpRequest.removeSemicolonContent(String requestUri)
focal_class.full_signature: public static String removeSemicolonContent(String requestUri)
focal_class.identifier: removeSemicolonContent
focal_class.modifiers: public static
focal_class.parameters: (String requestUri)
focal_class.return: String
focal_class.signature: String removeSemicolonContent(String requestUri)
focal_class.class_method_signature: MonitoredHttpRequest.getHeaders(HttpServletRequest request)
focal_class.full_signature: private Map<String, String> getHeaders(HttpServletRequest request)
focal_class.identifier: getHeaders
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest request)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getHeaders(HttpServletRequest request)
focal_class.class_method_signature: MonitoredHttpRequest.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: MonitoredHttpRequest.setUserAgentInformation(Span span, String userAgenHeader)
focal_class.full_signature: private void setUserAgentInformation(Span span, String userAgenHeader)
focal_class.identifier: setUserAgentInformation
focal_class.modifiers: private
focal_class.parameters: (Span span, String userAgenHeader)
focal_class.return: void
focal_class.signature: void setUserAgentInformation(Span span, String userAgenHeader)
focal_class.superclass: extends MonitoredRequest
focal_method.body: public static String getClientIp(HttpServletRequest request) {
  		String ip = request.getHeader("X-Forwarded-For");
  		ip = getIpFromHeaderIfNotAlreadySet("X-Real-IP", request, ip);
  		ip = getIpFromHeaderIfNotAlreadySet("Proxy-Client-IP", request, ip);
  		ip = getIpFromHeaderIfNotAlreadySet("WL-Proxy-Client-IP", request, ip);
  		ip = getIpFromHeaderIfNotAlreadySet("HTTP_CLIENT_IP", request, ip);
  		ip = getIpFromHeaderIfNotAlreadySet("HTTP_X_FORWARDED_FOR", request, ip);
  		if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
  			ip = request.getRemoteAddr();
  		}
  		return getFirstIp(ip);
  	}
focal_method.class_method_signature: MonitoredHttpRequest.getClientIp(HttpServletRequest request)
focal_method.full_signature: public static String getClientIp(HttpServletRequest request)
focal_method.identifier: getClientIp
focal_method.invocations: getHeader getIpFromHeaderIfNotAlreadySet getIpFromHeaderIfNotAlreadySet getIpFromHeaderIfNotAlreadySet getIpFromHeaderIfNotAlreadySet getIpFromHeaderIfNotAlreadySet length equalsIgnoreCase getRemoteAddr getFirstIp
focal_method.modifiers: public static
focal_method.parameters: (HttpServletRequest request)
focal_method.return: String
focal_method.signature: String getClientIp(HttpServletRequest request)