Skip to content

openzipkin-attic/faraday-zipkin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

This gem is deprecated. The code of this middleware has been moved into the Zipkin-tracer gem. Please use the FaradayHandler in the zipkin-tracer gem to get the most up-to-date code.

The README below is left only as reference for users of the old code.


Faraday::Zipkin

Build Status

Faraday middleware to generate Zipkin tracing headers.

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

This gem implements the client side described at http:https://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:https://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/openzipkin/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

About

Faraday middleware to insert Zipkin tracing headers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Ruby 100.0%