opentracing-contrib / nginx-opentracing

NGINX plugin for OpenTracing
Apache License 2.0
500 stars 121 forks source link

opentracing_propagate_context seems to be working only in location context #83

Open pznamensky opened 5 years ago

pznamensky commented 5 years ago

It looks like opentracing_propagate_context doesn't work in http and server level. However, this ability was introduced in v0.7.0. When opentracing_propagate_context defined in location block, everything works well. Tested with nginx-opentracing v0.8.0 and nginx v1.14.2.

xvf commented 5 years ago

+1

tallaxes commented 5 years ago

Observed the same, nginx-opentracing 0.8.0, nginx 1.13.6 (OpenResty 1.13.6.2)

xuanit commented 5 years ago

+1

bzon commented 5 years ago

I'm trying to use this with Nginx Ingress Controller. I also need to pass down the tracing context so I can bridge the distributed trace with a backend that uses OpenCensus.

2tvenom commented 4 years ago

+1

t2karlma commented 3 years ago

+1

sriemer commented 2 years ago

The problem is that the NGINX directive proxy_set_header voids opentracing_propagate_context as it is based on proxy_set_header internally. So you need to add opentracing_propagate_context where ever there is proxy_set_header. It is documented in the Instana NGINX tracing docs: https://www.instana.com/docs/ecosystem/nginx/#edit-the-nginx-configurations. Unfortunately, there is no way to get rid of this due to the internal data structures and APIs of NGINX.