Giter VIP home page Giter VIP logo

nginx-opentracing's Introduction

The repo has moved.

https://github.com/opentracing-contrib/nginx-opentracing

nginx-opentracing

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

Dependencies

Docker

A docker image rnburn/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.

Building

$ tar zxvf nginx-1.9.x.tar.gz
$ cd nginx-1.9.x
$ export NGINX_OPENTRACING_VENDOR="ZIPKIN" # or export NGINX_OPENTRACING_VENDOR="LIGHTSTEP"
$ ./configure --add-dynamic-module=/absolute/path/to/nginx-opentracing/opentracing \
              # To enable tracing with Zipkin
              --add-dynamic-module=/absolute/path/to/nginx-opentracing/zipkin \  
              # To enable tracing with LightStep
              --add-dynamic-module=/absolute/path/to/nginx-opentracing/lightstep
$ make && sudo make install

Getting Started

# Load the OpenTracing dynamic module.
load_module modules/ngx_http_opentracing_module.so;

# Load a vendor OpenTracing dynamic module.
# For example,
#   load_module modules/ngx_http_lightstep_module.so;
# or
#   load_module modules/ngx_http_zipkin_module.so;

http {
  # Configure your vendor's tracer.
  # For example,
  #     lightstep_access_token ACCESSTOKEN;
  #     ....
  # or
  #     zipkin_collector_host localhost;
  #     ...

  # Enable tracing for all requests.
  opentracing on;

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

  location ~ \.php$ {
    # 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;

    fastcgi_pass 127.0.0.1:1025;
  }
}

See Tutorial for a more complete example, Reference for a list of available OpenTracing-related directives, and LightStep and Zipkin for a list of vendor tracing directives.

nginx-opentracing's People

Contributors

rnburn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nginx-opentracing's Issues

Nginx 1.10.3 make error

Hi, I wanna install this module to my Nginx,but i got a error on the make step. My server environment infomations as below:

  • OS : CentOS 7
    cat /etc/redhat-release ===> CentOS Linux release 7.3.1611 (Core)

  • Nginx : nginx/1.10.3

and my install steps are:

  1. export NGINX_OPENTRACING_VENDOR="ZIPKIN"
  2. ./configure --prefix=/usr/local/nginx-1.10.3 --with-http_ssl_module --add-dynamic-module=/root/env/nginx-opentracing/opentracing --add-dynamic-module=/root/env/nginx-opentracing/zipkin
    this step (configure) is passed.
  3. make
    i got a error on this step.Error message as below:
    objs/src/http/modules/ngx_http_upstream_least_conn_module.o
    objs/src/http/modules/ngx_http_upstream_keepalive_module.o
    objs/src/http/modules/ngx_http_upstream_zone_module.o
    objs/ngx_modules.o
    -ldl -lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lz
    -Wl,-E
    cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g --std=c++11 -Wno-constexpr-not-const -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules
    -o objs/addon/src/ngx_http_opentracing_module.o
    /root/env/nginx-opentracing/opentracing/src/ngx_http_opentracing_module.cpp
    /root/env/nginx-opentracing/opentracing/src/ngx_http_opentracing_module.cpp: In function ‘void* create_opentracing_main_conf(ngx_conf_t*)’:
    /root/env/nginx-opentracing/opentracing/src/ngx_http_opentracing_module.cpp:107:40: error: missing initializer for member ‘ngx_opentracing::opentracing_main_conf_t::tags’ [-Werror=missing-field-initializers]
    *main_conf = opentracing_main_conf_t{};
    ^
    At global scope:
    cc1plus: error: unrecognized command line option "-Wno-constexpr-not-const" [-Werror]
    cc1plus: all warnings being treated as errors
    make[1]: *** [objs/addon/src/ngx_http_opentracing_module.o] Error 1
    make[1]: Leaving directory `/root/env/nginx-1.10.3'
    make: *** [build] Error 2

So,is there something wrong on my install steps ? And can you help me fix this error ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.