open-telemetry / opentelemetry-cpp-contrib

https://opentelemetry.io/
Apache License 2.0
121 stars 128 forks source link

nginx span shorter than upstream server span #459

Open naseemkullah opened 2 weeks ago

naseemkullah commented 2 weeks ago

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

nginx-ingress-controller on k8s, opentelemetry enabled backend nodejs service in same k8s cluster, opentelemetry enabled

Steps to reproduce setup an env as per above

What is the expected behavior? that the nginx span is a little longer than the upstream backend span, accounting for the network hop and what not

What is the actual behavior? its often exactly the same length (e.g. both are 500ms) or even more bizarre, sometimes the nginx span is shorter by a few ms

image

Additional context Wondering if it has to do with where the span starts and ends within this codebase