GithubHelp home page GithubHelp logo

jamescway / faraday-zipkin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oscil8/faraday-zipkin

0.0 2.0 0.0 354 KB

Faraday middleware to insert Zipkin tracing headers

License: MIT License

Ruby 100.00%

faraday-zipkin's Introduction

Faraday::Zipkin

Build Status

Faraday middleware to generate Zipkin tracing headers.

For more information about Zipkin, go to http://twitter.github.io/zipkin http://github.com/twitter/zipkin

This gem implements the client side described at http://twitter.github.io/zipkin/instrument.html

Note that you should also be using the zipkin-tracer Rack middleware to generate trace IDs around your requests: https://github.com/twitter/zipkin/tree/master/zipkin-gems/zipkin-tracer

Zipkin tracing headers for HTTP APIs are documented at https://github.com/twitter/zipkin/blob/master/doc/collector-api.md

Usage

Include Faraday::Zipkin::TraceHeaders as a Faraday middleware:

require 'faraday'
require 'faraday-zipkin'

conn = Faraday.new(:url => 'http://localhost:9292/') do |faraday|
  # 'service_name' is optional (but recommended)
  faraday.use Faraday::Zipkin::TraceHeaders, 'service_name'
  # default Faraday stack
  faraday.request :url_encoded
  faraday.adapter Faraday.default_adapter
end

Note that supplying the service name for the destination service is optional; the tracing will default to a service name derived from the first section of the destination URL (e.g. 'service.example.com' => 'service').

Contributing

  1. Fork it ( https://github.com/Oscil8/faraday-zipkin/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

faraday-zipkin's People

Contributors

oscil8 avatar

Watchers

Jw avatar James Cloos 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.