rails_opentracer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4c181eb9d05e45903b24fc2763d936b7eb5bf5c
4
- data.tar.gz: e590daa78234fb7447ce436cd974f57830b9127a
3
+ metadata.gz: b363c1b439ae8e9574219e8cea6b8b3eac8bc72e
4
+ data.tar.gz: 9c2b3db94eeeac2f748c0861e6b7199790d214f0
5
5
  SHA512:
6
- metadata.gz: ae5dcc5a1b708f6b4409614a48bdfc8b0453bf76bdc4703d456a46cdafd3eecb7c1e664a18782d7304a891e2e56eb5eb22e7c3d9a7348a9709c4fda902520dbe
7
- data.tar.gz: 09e028b25b0afd4020595ecd9876f026e1ee01f8933940e2d2449256c78f148eaedd3b31878f7209b5c66aadac917680fa8a8ab6eb5de6b4d80f27a7583247c6
6
+ metadata.gz: 959c878b41ac3358a02486ec1d91108426f30cd83c5ffa9f39d30f4dc64c5d9314ec87e5df4c3e1f870ec8bca642406a01715cd3dadf83b200bb8b2ffca9e504
7
+ data.tar.gz: 55892e8701e66a9df2b4581c742970d8ce6ef68e872e5aa3665718399dc8f4024239e2dedadaf98ee764c810bfe85c59a1052d9f1a815e70712fe24cf1edb924
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # RailsOpentracer
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rails_opentracer`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem instruments an application to be used with a tracing client. At this stage it is configured to be used with Zipkin only, but
4
+ this can be changed at a later stage.
6
5
 
7
6
  ## Installation
8
7
 
@@ -20,9 +19,39 @@ Or install it yourself as:
20
19
 
21
20
  $ gem install rails_opentracer
22
21
 
22
+ Generate files required by gem:
23
+
24
+ $ rails g rails_opentracer:install
25
+
26
+ Add the following to development.rb:
27
+
28
+ ```ruby
29
+ config.middleware.use Tracer
30
+ ```
31
+
23
32
  ## Usage
24
33
 
25
- TODO: Write usage instructions here
34
+ To run Zipkin locally, do:
35
+
36
+ $ docker run -d -p 9411:9411 openzipkin/zipkin
37
+
38
+ You will need to set an environment variable with the Zipkin client URL. Locally this would be: `ENV['ZIPKIN_SERVICE_URL']='http://localhost:9411'`.
39
+
40
+ Whenever a request is made to another application, do:
41
+
42
+ ```ruby
43
+ include RailsOpentracer
44
+ ```
45
+
46
+ in the applicable controller, and then:
47
+
48
+ ```ruby
49
+ with_span 'name of span' do
50
+ faraday_get(URL)
51
+ end
52
+ ```
53
+
54
+
26
55
 
27
56
  ## Development
28
57
 
@@ -1,6 +1,6 @@
1
1
  require 'rails/generators'
2
2
 
3
- module RailsFaradayTracer
3
+ module RailsOpentracer
4
4
  module Generators
5
5
  class InstallGenerator < Rails::Generators::Base
6
6
  source_root File.expand_path("../../templates", __FILE__)
@@ -1,3 +1,3 @@
1
1
  module RailsOpentracer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_opentracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Botes