nginx-opentracing icon indicating copy to clipboard operation
nginx-opentracing copied to clipboard

opentracing_propagate_context seems to be working only in location context

Open pznamensky opened this issue 6 years ago • 7 comments

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.

pznamensky avatar Jan 21 '19 13:01 pznamensky

+1

xvf avatar Feb 01 '19 17:02 xvf

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

tallaxes avatar Mar 16 '19 17:03 tallaxes

+1

xuanit avatar May 22 '19 03:05 xuanit

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.

bzon avatar Oct 21 '19 10:10 bzon

+1

2tvenom avatar Mar 04 '20 10:03 2tvenom

+1

t2karlma avatar Nov 11 '21 00:11 t2karlma

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.

sriemer avatar Nov 30 '21 10:11 sriemer