Request forwarding is not traced correctly

Description

If we have a incoming request that has our span and trace id, we will not create a new client span when this request is forwarded via the eureka. It's because of our createClientSpan method that checks if the request has been already populated with the span and trace id, and since request is forwarded then these are taken as already set. Thus we don't recognize the connections properly. This leads to the problem in the screenshot.

We need to check if we createClientSpan is necessary anymore, especially with fixing some of the problematic stuff with async calls which was the reason to add this in first place.

Environment

None

Activity

Show:
Technical User
August 10, 2017, 3:11 PM

SUCCESS: Integrated in

inspectIT - Integration #337
INSPECTIT-2505: Fixed tracing with http request forwarding (marius.oehler: 0cdad658b6f4f8d2796a80a210b60aa1f1f416d0)

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/sensor/method/remote/client/http/UrlConnectionSensor.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/sensor/method/remote/client/http/SpringRestTemplateClientSensor.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/impl/ApacheHttpClientV40HttpClientRequest.java

  • (edit) inspectit.agent.java/src/test/java/rocks/inspectit/agent/java/sensor/method/remote/client/http/ApacheHttpClientV40SensorTest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/HttpRequest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/empty/EmptyRequestAdapter.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/impl/JettyHttpClientV61HttpClientRequest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/sensor/method/remote/client/http/ApacheHttpClientV40Sensor.java

  • (edit) inspectit.agent.java/src/test/java/rocks/inspectit/agent/java/sensor/method/remote/client/http/SpringRestTemplateClientSensorTest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/impl/UrlConnectionHttpClientRequestResponse.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/impl/JavaHttpServerRequest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/HttpClientRequestAdapter.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/AsyncHttpClientRequestAdapter.java

  • (add) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/ClientHttpRequest.java

  • (edit) inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/data/impl/SpringRestTemplateHttpClientRequest.java

Ivan Senic
August 9, 2017, 10:05 AM

Please discuss with me before starting the integration if the problem/bug is not clear.

Ivan Senic
August 9, 2017, 9:01 AM

Fixed same use case as before now has correct tracing:

Fixed

Assignee

Ivan Senic

Reporter

Ivan Senic

Integrator

Marius Oehler