Giter Site home page Giter Site logo

devopsmi / nginx-opentracing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opentracing-contrib/nginx-opentracing

0.0 2.0 0.0 3.67 MB

NGINX plugin for OpenTracing

License: Apache License 2.0

Shell 2.52% JavaScript 10.18% HTML 3.14% Go 41.28% Thrift 0.10% Makefile 0.97% C++ 41.21% Python 0.58%

nginx-opentracing's Introduction

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
$ ./configure --add-dynamic-module=/absolute/path/to/nginx-opentracing/opentracing \
              # To enable tracing with Jaeger
              --add-dynamic-module=/absolute/path/to/nginx-opentracing/jaeger \
              # 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_jaeger_module.so;
# or
#   load_module modules/ngx_http_zipkin_module.so;
# or
#   load_module modules/ngx_http_lightstep_module.so;

http {
  # Configure your vendor's tracer.
  # For example,
  #     jaeger_service_name my-nginx-server;
  #     ...
  # or
  #     zipkin_collector_host localhost;
  #     ...
  # or
  #     lightstep_access_token ACCESSTOKEN;
  #     ....

  # 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 Jaeger, Zipkin, and LightStep for a list of vendor tracing directives.

nginx-opentracing's People

Contributors

rnburn avatar isaachier avatar cmur2 avatar carlosjgp avatar sejeff avatar narayanasamyr avatar

Watchers

James Cloos avatar  avatar

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.