You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the last while, I've been using natchez-extras-datadog-stable to send metrics. For various reasons (mostly due to correlating with other datadog-internal generated traces), DataDog support tells me that the preferred solution is to have the instrumented JVM send the metrics, and not do it myself (via the blaze client impl above).
Their recommended solution for me is to create opentelemetry traces. The datadog agent (instrumented in the JVM) will automatically pick these up and convert/dispatch them to datadog.
Issue
I dropped natchez-extras-datadog-stable and using just natchez-opentelementry from this project. I am able to create an trace that does indeed get picked up and sent to datadog - which is great!
The problem starts when I try to mix http4s middleware into the mix.
No matter what I try, I can't seem to get traces from the instrumented routes to show up, even though this is the same EntryPoint instance that I can directly invoke to get valid traces created.
reproducing the issue
I did find a hacky way to intercept and view the traces that datadog is ignoring, and it does appear the difference is that
when I directly use the entrypoint, a valid traceID is set. When I use the middleware, this is 0 (datadog requires a non-zero 64 bit signed int)
background
For the last while, I've been using natchez-extras-datadog-stable to send metrics. For various reasons (mostly due to correlating with other datadog-internal generated traces), DataDog support tells me that the preferred solution is to have the instrumented JVM send the metrics, and not do it myself (via the blaze client impl above).
Their recommended solution for me is to create opentelemetry traces. The datadog agent (instrumented in the JVM) will automatically pick these up and convert/dispatch them to datadog.
Issue
I dropped
natchez-extras-datadog-stable
and using justnatchez-opentelementry
from this project. I am able to create an trace that does indeed get picked up and sent to datadog - which is great!The problem starts when I try to mix http4s middleware into the mix.
I've tried both
No matter what I try, I can't seem to get traces from the instrumented routes to show up, even though this is the same
EntryPoint
instance that I can directly invoke to get valid traces created.reproducing the issue
I did find a hacky way to intercept and view the traces that datadog is ignoring, and it does appear the difference is that
when I directly use the entrypoint, a valid traceID is set. When I use the middleware, this is
0
(datadog requires a non-zero 64 bit signed int)If it helps, I created an example application - https://github.com/barryoneill/natchez-otel-datadog-experiments - that:
EndPoint
EndPoint
directlyEndpoint
as test A, one usingnatchez-http4s
and the othernatchez-http4s-otel
Outcome:
0
value (and in the real world, don't show up in datadog)Sample output:
The text was updated successfully, but these errors were encountered: