Skip to content

Opentracing directive behavior in http vs location block #466

@phillipuniverse

Description

@phillipuniverse

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions