Java instrumentation and clock skew problem #2590
Replies: 3 comments
-
hey @rkondrashov, thanks for the report! For the interop tests with other languages, I believe this is the issue you are seeing: #2600 On the last image (where only java is present), is the red box below your concern? If so, there are a couple possible explanations for that
|
Beta Was this translation helpful? Give feedback.
-
@trask thanks for the detailed answer. That's right, on the last screenshot (java app only) my concern is about the end-time of the request in the red box below. It looks a bit curious, so that on a synchronous request the client receives a response before the server returns it. The question, is it reasonable to measure the entire request-response lifecycle duration of the servlet/container or just the response time instead. I mean, the end users are usually only interested in the request execution time. I'll test it with other suggested clients and post the results. |
Beta Was this translation helpful? Give feedback.
-
I have tested it with OkHttp and Apache clients and other containers like Jetty and Netty (WebFlux). The result is the same, the spans from time to time are also wrong aligned. What I noticed was that the deviation is always in the microseconds range, mostly between 100 and 700 microseconds. Could it be also caused by #2600? |
Beta Was this translation helpful? Give feedback.
-
In k8s environment I frequently see some wrong aligned spans generated by java instrumentation, but the spans generated by other instrumentations like go and python are always aligned correctly.
I've created a sample project to reproduce this behavior and tested different combinations of the go and java applications on my local machine. The behavior is the same: the spans generated by java instrumentation are often wrong aligned and the spans generated by go instrumentation are not affected by this problem.
Is it a kind of the clock skew problem due to the different programming languages and time libraries or an issue with java instrumentation? For me it looks like a time accuracy problem in java instrumentation, an application which calls itself (same host, jre, agent and libraries) also produces wrong aligned spans.
traces.zip
Beta Was this translation helpful? Give feedback.
All reactions