opentracing-contrib/nginx-opentracing

Opentracing directive behavior in http vs location block

phillipuniverse opened this issue · 0 comments

I have some kind of weird behavior, and I'm not sure if this is intended or not. Here is a simple example of nginx.conf:

http {
load_module modules/ngx_http_opentracing_module.so;

events {}

http {
  opentracing on;

  opentracing_load_tracer /usr/local/lib/libdd_opentracing_plugin.so /etc/datadog-config.json;
  upstream backend {
    server app-service:9001;
  }

  server {
    error_log /var/log/nginx/debug.log debug;
    listen 8080;
    server_name localhost;

    location = /no-tracing {
        opentracing off;
        proxy_pass http://backend;
    }

    location = / {
      proxy_pass http://backend;
      opentracing_propagate_context;
    }
    location = 
  }
}

In this configuration scenario, I have opentracing on at the http level, but opentracing off at the location level. So my question is if I hit /no-tracing, is the expectation that request is traced or not?