<!-- review: finished -->

<a id="external-opentracing"></a>

# Opentracing

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

<a id="installation-20"></a>

## Installation

To [install](https://en.angie.software//angie/docs/installation/index.md#install-packages) the module, use one of the following packages:

- Angie: `angie-module-opentracing`
- Angie PRO: `angie-pro-module-opentracing`

<a id="loading-the-module-20"></a>

## Loading the Module

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

```nginx
load_module modules/ngx_http_opentracing_module.so;
```

<a id="configuration-example-94"></a>

## Configuration Example

```nginx
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" "/";
        }
    }
}
```

<a id="additional-information-21"></a>

## Additional Information

Various configuration options can be found at:
[https://github.com/opentracing-contrib/nginx-opentracing/tree/master/example](https://github.com/opentracing-contrib/nginx-opentracing/tree/master/example)

Detailed documentation and source code are available at:
[https://github.com/opentracing-contrib/nginx-opentracing](https://github.com/opentracing-contrib/nginx-opentracing)
