Opentracing#

The Opentracing module adds distributed OpenTracing request tracing to Angie; it includes plugins for exporting data to Zipkin and DataDog.

Installation#

To install the module, use one of the following packages:

  • Angie: angie-module-opentracing

  • Angie PRO: angie-pro-module-opentracing

Loading the Module#

To work with the module, it must be loaded in the main{} context:

load_module modules/ngx_http_opentracing_module.so;

Configuration Example#

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/angie/debug.log debug;
        listen 8080;
        server_name localhost;

        location = / {
            opentracing_trace_locations off;
            proxy_pass http://backend;
            opentracing_propagate_context;
            opentracing_tag "resource.name" "/";
        }
    }
}

Additional Information#

Various configuration options can be found at: opentracing-contrib/nginx-opentracing

Detailed documentation and source code are available at: opentracing-contrib/nginx-opentracing