rails_opentracer 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b363c1b439ae8e9574219e8cea6b8b3eac8bc72e
|
4
|
+
data.tar.gz: 9c2b3db94eeeac2f748c0861e6b7199790d214f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 959c878b41ac3358a02486ec1d91108426f30cd83c5ffa9f39d30f4dc64c5d9314ec87e5df4c3e1f870ec8bca642406a01715cd3dadf83b200bb8b2ffca9e504
|
7
|
+
data.tar.gz: 55892e8701e66a9df2b4581c742970d8ce6ef68e872e5aa3665718399dc8f4024239e2dedadaf98ee764c810bfe85c59a1052d9f1a815e70712fe24cf1edb924
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# RailsOpentracer
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
|