0.0
No commit activity in last 3 years
No release in over 3 years
Semlogr integration for faraday providing features such as correlation id propogation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 0.11
~> 12.3
~> 3.7
~> 0.53

Runtime

~> 0.12
~> 0.3
 Project Readme

Codeship Status for semlogr/semlogr-faraday Maintainability Test Coverage

Semlogr integration for Faraday

This integration provides the ability to propogate a correlation id from the current log Semlogr context to your outgoing Faraday requests.

Installation

To install:

gem install semlogr-faraday

Or if using bundler, add semlogr to your Gemfile:

gem 'semlogr-faraday'

then:

bundle install

Getting Started

Simply configure the RequestCorrelator middleware on your Faraday instance, it will propogate the correlation_id property from your current Semlogr ambient log context as an outgoing X-Correlation-Id header on the request.

This can be used in combination with the semlogr-rack extension to provide a full end to end proprogation of correlation ids between your services.

require 'semlogr/faraday'

faraday = Faraday.new('http://test.com') do |c|
  c.request :semlogr_request_correlator

  c.adapter Faraday.default_adapter
end

faraday.get('/test')

Development

After cloning the repository run bundle install to get up and running, to run the specs just run rake spec.

Contributing

See anything broken or something you would like to improve? feel free to submit an issue or better yet a pull request!