All Projects → opentracing-contrib → Nginx Opentracing

opentracing-contrib / Nginx Opentracing

Licence: apache-2.0
NGINX plugin for OpenTracing

Projects that are alternatives of or similar to Nginx Opentracing

Instrument nginx for OpenTracing.
Stars: ✭ 21 (-93.84%)
Mutual labels:  tracing, opentracing, zipkin, nginx-module
OpenTracing Tracer implementation for Zipkin in C++
Stars: ✭ 46 (-86.51%)
Mutual labels:  tracing, opentracing, zipkin
OpenTracing Tracer implementation for Zipkin in Ruby
Stars: ✭ 15 (-95.6%)
Mutual labels:  tracing, opentracing, zipkin
Go Microservice Helpers
A collection of handy snippets that simplify creation of GRPC servers and clients
Stars: ✭ 400 (+17.3%)
Mutual labels:  tracing, zipkin, opentracing
Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (-81.23%)
Mutual labels:  tracing, zipkin, opentracing
php probe for zipkin and opentracing
Stars: ✭ 740 (+117.01%)
Mutual labels:  tracing, zipkin, opentracing
Zipkin Go Opentracing
OpenTracing Bridge for Zipkin Go
Stars: ✭ 472 (+38.42%)
Mutual labels:  tracing, zipkin, opentracing
An agent component for the Java system
Stars: ✭ 437 (+28.15%)
Mutual labels:  tracing, opentracing, zipkin
Vertx integration with tracing libraries
Stars: ✭ 21 (-93.84%)
Mutual labels:  tracing, opentracing, zipkin
OpenTracing Java Web Servlet Filter Instrumentation
Stars: ✭ 20 (-94.13%)
Mutual labels:  tracing, opentracing
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (-72.43%)
Mutual labels:  tracing, zipkin
Ngx php7
ngx_php7 - Embedded php7 scripting language for nginx module. Mainline development version of the ngx_php.
Stars: ✭ 337 (-1.17%)
Mutual labels:  nginx, nginx-module
🚀 Go Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 90 (-73.61%)
Mutual labels:  tracing, opentracing
Laravel + go-micro + grpc + Zipkin
Stars: ✭ 65 (-80.94%)
Mutual labels:  opentracing, zipkin
OpenTracing Tracer implementation for GCloud StackDriver in Go.
Stars: ✭ 44 (-87.1%)
Mutual labels:  tracing, opentracing
No description or website provided.
Stars: ✭ 31 (-90.91%)
Mutual labels:  tracing, opentracing
Convert tracing data between Zipkin and Haystack formats
Stars: ✭ 40 (-88.27%)
Mutual labels:  tracing, zipkin
💎 Ruby Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 23 (-93.26%)
Mutual labels:  tracing, opentracing
Canonical OpenTracing for GoLang
Stars: ✭ 12 (-96.48%)
Mutual labels:  tracing, opentracing
OpenTracing Okhttp client instrumentation
Stars: ✭ 21 (-93.84%)
Mutual labels:  tracing, opentracing


Enable requests served by nginx for distributed tracing via The OpenTracing Project.



For linux-x86_64, pre-compiled binaries are provided for the supported versions of NGINX. These can be dropped into existing NGINX installations provided that NGINX was compiled with the --with-compat option. See example/trivial/ubuntu-x86_64 for an example of how to set it up.

Otherwise, nginx-opentracing can be used from the Docker image or built from source.

Getting Started

First, write a configuration for the tracer used. Below's an example of what a Jaeger configuration might look like:


  "service_name": "nginx",
  "sampler": {
    "type": "const",
    "param": 1
  "reporter": {
    "localAgentHostPort": "jaeger:6831"
  "headers": {
    "jaegerDebugHeader": "jaeger-debug-id",
    "jaegerBaggageHeader": "jaeger-baggage",
    "traceBaggageHeaderPrefix": "uberctx-"
  "baggage_restrictions": {
    "denyBaggageOnInitializationFailure": false,
    "hostPort": ""

See the vendor documentation for details on what options are available.

You can then set up NGINX for distributed tracing by adding the following to nginx.conf:

# Load the OpenTracing dynamic module.
load_module modules/;

http {
  # Load a vendor tracer
  opentracing_load_tracer /usr/local/lib/ /etc/jaeger-nginx-config.json;

  # or
  #   opentracing_load_tracer /usr/local/lib/ /path/to/config;
  # or
  #   opentracing_load_tracer /usr/local/lib/ /path/to/config;
  # or
  #   opentracing_load_tracer /usr/local/lib/ /path/to/config;

  # Enable tracing for all requests.
  opentracing on;

  # Optionally, set additional tags.
  opentracing_tag http_user_agent $http_user_agent;

  upstream backend {
    server app-service:9001;

  location ~ {
    # The operation name used for spans defaults to the name of the location
    # block, but you can use this directive to customize it.
    opentracing_operation_name $uri;

    # Propagate the active span context upstream, so that the trace can be
    # continued by the backend.
    # See

    proxy_pass http://backend;

See Tutorial for a more complete example, Reference for a list of available OpenTracing-related directives.


A docker image opentracing/nginx-opentracing is provided to support using nginx with OpenTracing in a manner analogous to the nginx Docker image. See here for examples of how to use it.

Additionally, custom images can be built by running

docker build \
       -t opentracing-contrib/nginx-opentracing:latest \

and arguments to tweak the versions used can be provided with

docker build \
       -t opentracing-contrib/nginx-opentracing:latest \
       --build-arg OPENTRACING_CPP_VERSION=master \

Other build arguments


Building From Source

$ tar zxvf nginx-1.9.x.tar.gz
$ cd nginx-1.9.x
$ ./configure --add-dynamic-module=/absolute/path/to/nginx-opentracing/opentracing
$ make && sudo make install

You will also need to install a C++ tracer for either Jaeger, LightStep, Datadog, or Zipkin. For linux x86-64, portable binary plugins are available:

# Jaeger
wget -O /usr/local/lib/

# LightStep
wget -O - | gunzip -c > /usr/local/lib/

# Zipkin
wget -O - | gunzip -c > /usr/local/lib/

# Datadog
wget -O - | gunzip -c > /usr/local/lib/

Make sure the nginx module for opentracing and a tracer plugin were built against the same version of C++ OpenTracing Library. By default Opentracing v1.6.0 is used.


Run tests on local machine requires pyenv and tested against version 3.8.5.

$ make test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].