dox-jaeger-client 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +33 -0
  3. data/.gitignore +12 -0
  4. data/.gitmodules +3 -0
  5. data/.rspec +2 -0
  6. data/.rubocop.yml +61 -0
  7. data/.rubocop_todo.yml +13 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/Makefile +1 -0
  11. data/README.md +210 -0
  12. data/Rakefile +9 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/crossdock/Dockerfile +31 -0
  16. data/crossdock/Gemfile +6 -0
  17. data/crossdock/Gemfile.lock +37 -0
  18. data/crossdock/docker-compose.yml +68 -0
  19. data/crossdock/jaeger-docker-compose.yml +53 -0
  20. data/crossdock/rules.mk +35 -0
  21. data/crossdock/server +175 -0
  22. data/jaeger-client.gemspec +37 -0
  23. data/lib/jaeger/client/version.rb +7 -0
  24. data/lib/jaeger/client.rb +77 -0
  25. data/lib/jaeger/encoders/thrift_encoder.rb +173 -0
  26. data/lib/jaeger/extractors.rb +173 -0
  27. data/lib/jaeger/http_sender.rb +28 -0
  28. data/lib/jaeger/injectors.rb +83 -0
  29. data/lib/jaeger/rate_limiter.rb +61 -0
  30. data/lib/jaeger/recurring_executor.rb +35 -0
  31. data/lib/jaeger/reporters/composite_reporter.rb +17 -0
  32. data/lib/jaeger/reporters/in_memory_reporter.rb +30 -0
  33. data/lib/jaeger/reporters/logging_reporter.rb +22 -0
  34. data/lib/jaeger/reporters/null_reporter.rb +11 -0
  35. data/lib/jaeger/reporters/remote_reporter/buffer.rb +29 -0
  36. data/lib/jaeger/reporters/remote_reporter.rb +42 -0
  37. data/lib/jaeger/reporters.rb +7 -0
  38. data/lib/jaeger/samplers/const.rb +24 -0
  39. data/lib/jaeger/samplers/guaranteed_throughput_probabilistic.rb +47 -0
  40. data/lib/jaeger/samplers/per_operation.rb +77 -0
  41. data/lib/jaeger/samplers/probabilistic.rb +40 -0
  42. data/lib/jaeger/samplers/rate_limiting.rb +51 -0
  43. data/lib/jaeger/samplers/remote_controlled/instructions_fetcher.rb +34 -0
  44. data/lib/jaeger/samplers/remote_controlled.rb +119 -0
  45. data/lib/jaeger/samplers.rb +8 -0
  46. data/lib/jaeger/scope.rb +39 -0
  47. data/lib/jaeger/scope_manager/scope_identifier.rb +13 -0
  48. data/lib/jaeger/scope_manager/scope_stack.rb +33 -0
  49. data/lib/jaeger/scope_manager.rb +48 -0
  50. data/lib/jaeger/span/thrift_log_builder.rb +18 -0
  51. data/lib/jaeger/span.rb +97 -0
  52. data/lib/jaeger/span_context.rb +57 -0
  53. data/lib/jaeger/thrift_tag_builder.rb +42 -0
  54. data/lib/jaeger/trace_id.rb +48 -0
  55. data/lib/jaeger/tracer.rb +214 -0
  56. data/lib/jaeger/udp_sender/transport.rb +41 -0
  57. data/lib/jaeger/udp_sender.rb +26 -0
  58. data/script/create_follows_from_trace +51 -0
  59. data/script/create_trace +52 -0
  60. data/thrift/agent.thrift +32 -0
  61. data/thrift/gen-rb/jaeger/thrift/agent/agent.rb +118 -0
  62. data/thrift/gen-rb/jaeger/thrift/agent/agent_constants.rb +15 -0
  63. data/thrift/gen-rb/jaeger/thrift/agent/agent_types.rb +17 -0
  64. data/thrift/gen-rb/jaeger/thrift/agent.rb +116 -0
  65. data/thrift/gen-rb/jaeger/thrift/agent_constants.rb +13 -0
  66. data/thrift/gen-rb/jaeger/thrift/agent_types.rb +15 -0
  67. data/thrift/gen-rb/jaeger/thrift/collector.rb +82 -0
  68. data/thrift/gen-rb/jaeger/thrift/jaeger_constants.rb +13 -0
  69. data/thrift/gen-rb/jaeger/thrift/jaeger_types.rb +211 -0
  70. data/thrift/gen-rb/jaeger/thrift/zipkin/zipkin_collector.rb +84 -0
  71. data/thrift/gen-rb/jaeger/thrift/zipkin/zipkincore_constants.rb +41 -0
  72. data/thrift/gen-rb/jaeger/thrift/zipkin/zipkincore_types.rb +220 -0
  73. data/thrift/jaeger.thrift +88 -0
  74. data/thrift/zipkincore.thrift +300 -0
  75. metadata +260 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ed0aa9acc366ce81d7dca5190f529328d54f0045799c81b82902fbb56397f49e
4
+ data.tar.gz: '018c4bb34aec6d30861d6e1d56a7530e1249d04fc72a1f6bc19d530cc7206a90'
5
+ SHA512:
6
+ metadata.gz: 85e73b523c2882025d566143972d194cbfb78035d472ea9b5a9095b3b68394d1b35097fc4751fddeaf5f42f755611704068b07b212a7b5d30fdca95b722ab4fd
7
+ data.tar.gz: f98a7b8e25a47ed07ec95ff4464cae1dba6d66feeb5d14c9ad0fdae139fdf6682786fce64d2cfd49c6a7552ef761fe6c0e7b06b987cc65b8b0f142a331eaba33
@@ -0,0 +1,33 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches: [ master ]
7
+ schedule:
8
+ # Runs at 00:00 UTC on the 1st of every month.
9
+ - cron: '0 0 1 * *'
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ ruby-version: ['2.7.2', '3.0', '3.1']
17
+
18
+ services:
19
+ postgres:
20
+ image: docker
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ with:
24
+ submodules: true
25
+ - name: Set up Ruby
26
+ uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: ${{ matrix.ruby-version }}
29
+ bundler-cache: true
30
+ - name: Run tests
31
+ run: bundle exec rake
32
+ - name: Run crossdock
33
+ run: make crossdock
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "idl"]
2
+ path = idl
3
+ url = https://github.com/jaegertracing/jaeger-idl.git
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,61 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require: rubocop-rspec
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - 'thrift/**/*'
8
+ - 'vendor/bundle/**/*'
9
+ NewCops: enable
10
+ TargetRubyVersion: '2.7'
11
+
12
+ Style/Documentation:
13
+ Enabled: no
14
+
15
+ Style/IfUnlessModifier:
16
+ Enabled: no
17
+
18
+ RSpec/NestedGroups:
19
+ Max: 4
20
+
21
+ RSpec/ExampleLength:
22
+ Enabled: no
23
+
24
+ RSpec/MultipleExpectations:
25
+ Enabled: no
26
+
27
+ RSpec/MultipleMemoizedHelpers:
28
+ Enabled: no
29
+
30
+ RSpec/MessageSpies:
31
+ Enabled: no
32
+
33
+ Metrics/BlockLength:
34
+ Enabled: no
35
+
36
+ Metrics/MethodLength:
37
+ Enabled: no
38
+
39
+ Metrics/AbcSize:
40
+ Enabled: no
41
+
42
+ Metrics/ClassLength:
43
+ Enabled: no
44
+
45
+ Metrics/ParameterLists:
46
+ Enabled: no
47
+
48
+ Lint/UnusedMethodArgument:
49
+ Enabled: no
50
+
51
+ Style/FrozenStringLiteralComment:
52
+ Enabled: yes
53
+ EnforcedStyle: always
54
+ Include:
55
+ - 'lib/**/*'
56
+
57
+ Layout/LineLength:
58
+ Max: 120
59
+
60
+ Style/SingleLineMethods:
61
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,13 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-01-25 17:49:13 UTC using RuboCop version 1.25.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ Style/CollectionCompact:
12
+ Exclude:
13
+ - 'lib/jaeger/tracer.rb'
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jaeger-client.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Indrek Juhkam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Makefile ADDED
@@ -0,0 +1 @@
1
+ -include crossdock/rules.mk
data/README.md ADDED
@@ -0,0 +1,210 @@
1
+ Jaeger::Client
2
+ ================
3
+ This gem is a basic fork of https://github.com/salemove/jaeger-client-ruby with the ruby version
4
+ relaxed in the gemspec. We are using it to hold us over as we upgrade to open telemetry.
5
+
6
+ **This project is not actively maintained. Please consider using [OpenTelemetry](https://opentelemetry.io/)**
7
+
8
+ OpenTracing Tracer implementation for Jaeger in Ruby
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'jaeger-client'
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```ruby
21
+ require 'jaeger/client'
22
+ OpenTracing.global_tracer = Jaeger::Client.build(host: 'localhost', port: 6831, service_name: 'echo')
23
+
24
+ OpenTracing.start_active_span('span name') do
25
+ # do something
26
+
27
+ OpenTracing.start_active_span('inner span name') do
28
+ # do something else
29
+ end
30
+ end
31
+
32
+ # don't kill the program too soon, allow time for the background reporter to send the traces
33
+ sleep 2
34
+ ```
35
+
36
+ See [opentracing-ruby](https://github.com/opentracing/opentracing-ruby) for more examples.
37
+
38
+ ### Reporters
39
+
40
+ #### RemoteReporter (default)
41
+
42
+ RemoteReporter buffers spans in memory and sends them out of process using Sender.
43
+
44
+ There are two senders: `UdpSender` (default) and `HttpSender`.
45
+
46
+ To use `HttpSender`:
47
+
48
+ ```ruby
49
+ OpenTracing.global_tracer = Jaeger::Client.build(
50
+ service_name: 'service_name',
51
+ reporter: Jaeger::Reporters::RemoteReporter.new(
52
+ sender: Jaeger::HttpSender.new(
53
+ url: 'http://localhost:14268/api/traces',
54
+ headers: { 'key' => 'value' }, # headers key is optional
55
+ encoder: Jaeger::Encoders::ThriftEncoder.new(service_name: 'service_name')
56
+ ),
57
+ flush_interval: 10
58
+ )
59
+ )
60
+ ```
61
+
62
+ #### NullReporter
63
+
64
+ NullReporter ignores all spans.
65
+
66
+ ```ruby
67
+ OpenTracing.global_tracer = Jaeger::Client.build(
68
+ service_name: 'service_name',
69
+ reporter: Jaeger::Reporters::NullReporter.new
70
+ )
71
+ ```
72
+
73
+ #### LoggingReporter
74
+
75
+ LoggingReporter prints some details about the span using `logger`. This is meant only for debugging. Do not parse and use this information for anything critical. The implemenation can change at any time.
76
+
77
+ ```ruby
78
+ OpenTracing.global_tracer = Jaeger::Client.build(
79
+ service_name: 'service_name',
80
+ reporter: Jaeger::Reporters::LoggingReporter.new
81
+ )
82
+ ```
83
+
84
+ LoggingReporter can also use a custom logger. For this provide logger using `logger` keyword argument.
85
+
86
+ ### Samplers
87
+
88
+ #### Const sampler
89
+
90
+ `Const` sampler always makes the same decision for new traces depending on the initialization value. Set `sampler` to: `Jaeger::Samplers::Const.new(true)` to mark all new traces as sampled.
91
+
92
+ #### Probabilistic sampler
93
+
94
+ `Probabilistic` sampler samples traces with probability equal to `rate` (must be between 0.0 and 1.0). This can be enabled by setting `Jaeger::Samplers::Probabilistic.new(rate: 0.1)`
95
+
96
+ #### RateLimiting sampler
97
+
98
+ `RateLimiting` sampler samples at most `max_traces_per_second`. The distribution of sampled traces follows burstiness of the service, i.e. a service with uniformly distributed requests will have those requests sampled uniformly as well, but if requests are bursty, especially sub-second, then a number of sequential requests can be sampled each second.
99
+
100
+ Set `sampler` to `Jaeger::Samplers::RateLimiting.new(max_traces_per_second: 100)`
101
+
102
+ #### GuaranteedThroughputProbabilistic sampler
103
+
104
+ `GuaranteedThroughputProbabilistic` is a sampler that guarantees a throughput by using a Probabilistic sampler and RateLimiting sampler The RateLimiting sampler is used to establish a lower_bound so that every operation is sampled at least once in the time interval defined by the lower_bound.
105
+
106
+ Set `sampler` to `Jaeger::Samplers::GuaranteedThroughputProbabilistic.new(lower_bound: 10, rate: 0.001)`
107
+
108
+ #### PerOperation sampler
109
+
110
+ `PerOperation` sampler leverages both Probabilistic sampler and RateLimiting sampler via the GuaranteedThroughputProbabilistic sampler. This sampler keeps track of all operations and delegates calls the the respective GuaranteedThroughputProbabilistic sampler.
111
+
112
+ Set `sampler` to
113
+ ```ruby
114
+ Jaeger::Samplers::PerOperation.new(
115
+ strategies: {
116
+ per_operation_strategies: [
117
+ { operation: 'GET /articles', probabilistic_sampling: { sampling_rate: 0.5 } },
118
+ { operation: 'POST /articles', probabilistic_sampling: { sampling_rate: 1.0 } }
119
+ ],
120
+ default_sampling_probability: 0.001,
121
+ default_lower_bound_traces_per_second: 1.0 / (10.0 * 60.0)
122
+ },
123
+ max_operations: 1000
124
+ )
125
+ ```
126
+
127
+ #### RemoteControlled sampler
128
+
129
+ `RemoteControlled` sampler is a sampler that is controller by jaeger agent. It starts out with `Probabilistic` sampler. It polls the jaeger-agent and changes sampling strategy accordingly. Set `sampler` to `Jaeger::Client::Samplers::RemoteControlled.new(service_name: 'service_name')`.
130
+
131
+ RemoteControlled sampler options:
132
+
133
+ | Param | Required | Description |
134
+ |-------------------|----------|-------------|
135
+ | service_name | x | name of the current service / application, same as given to Tracer |
136
+ | sampler | | initial sampler to use prior to retrieving strategies from Agent |
137
+ | refresh_interval | | interval in seconds before sampling strategy refreshes (0 to not refresh, defaults to 60) |
138
+ | host | | host for jaeger-agent (defaults to 'localhost') |
139
+ | port | | port for jaeger-agent for SamplingManager endpoint (defaults to 5778) |
140
+ | logger | | logger for communication between jaeger-agent (default to $stdout logger) |
141
+
142
+ ### TraceContext compatible header propagation
143
+
144
+ It is possible to use [W3C Trace Context](https://www.w3.org/TR/trace-context/#overview) headers to propagate the tracing information.
145
+
146
+ To set it up you need to change FORMAT_RACK injector and extractor.
147
+
148
+ ```ruby
149
+ OpenTracing.global_tracer = Jaeger::Client.build(
150
+ service_name: 'service_name',
151
+ injectors: {
152
+ OpenTracing::FORMAT_RACK => [Jaeger::Injectors::TraceContextRackCodec]
153
+ },
154
+ extractors: {
155
+ OpenTracing::FORMAT_RACK => [Jaeger::Extractors::TraceContextRackCodec]
156
+ }
157
+ )
158
+ ```
159
+
160
+ ### Zipkin HTTP B3 compatible header propagation
161
+
162
+ Jaeger Tracer supports Zipkin B3 Propagation HTTP headers, which are used by a lot of Zipkin tracers. This means that you can use Jaeger in conjunction with OpenZipkin tracers.
163
+
164
+ To set it up you need to change FORMAT_RACK injector and extractor.
165
+
166
+ ```ruby
167
+ OpenTracing.global_tracer = Jaeger::Client.build(
168
+ service_name: 'service_name',
169
+ injectors: {
170
+ OpenTracing::FORMAT_RACK => [Jaeger::Injectors::B3RackCodec]
171
+ },
172
+ extractors: {
173
+ OpenTracing::FORMAT_RACK => [Jaeger::Extractors::B3RackCodec]
174
+ }
175
+ )
176
+ ```
177
+
178
+ It's also possible to set up multiple injectors and extractors. Each injector will be called in sequence. Note that if multiple injectors are using the same keys then the values will be overwritten.
179
+
180
+ If multiple extractors is used then the span context from the first match will be returned.
181
+
182
+ ### Process Tags
183
+
184
+ Jaeger Tracer allows you to define process level tags. By default the tracer provides `jaeger.version`, `ip` and `hostname`. You may want to overwrite `ip` or `hostname` if the tracer cannot auto-detect them.
185
+
186
+ ```ruby
187
+ OpenTracing.global_tracer = Jaeger::Client.build(
188
+ service_name: 'service_name',
189
+ tags: {
190
+ 'hostname' => 'custom-hostname',
191
+ 'custom_tag' => 'custom-tag-value'
192
+ }
193
+ )
194
+ ```
195
+
196
+ ## Development
197
+
198
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
199
+
200
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
201
+
202
+ ## Contributing
203
+
204
+ Bug reports and pull requests are welcome on GitHub at https://github.com/salemove/jaeger-client-ruby
205
+
206
+
207
+ ## License
208
+
209
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
210
+
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ RuboCop::RakeTask.new(:rubocop)
8
+
9
+ task default: %i[rubocop spec]
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'jaeger/client'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,31 @@
1
+ FROM ruby:2.7-alpine
2
+
3
+ ENV APP_HOME /app
4
+
5
+ # git is required by bundler to run jaeger gem with local path
6
+ RUN apk add --no-cache git
7
+
8
+ # Add only files needed for installing gem dependencies. This allows us to
9
+ # change other files without needing to install gems every time when building
10
+ # the docker image.
11
+ ADD Gemfile Gemfile.lock jaeger-client.gemspec $APP_HOME/
12
+ ADD lib/jaeger/client/version.rb $APP_HOME/lib/jaeger/client/
13
+ ADD crossdock/Gemfile crossdock/Gemfile.lock $APP_HOME/crossdock/
14
+
15
+ RUN gem install bundler -v $(tail -n 1 $APP_HOME/Gemfile.lock | awk '{$1=$1};1')
16
+
17
+ RUN apk add --no-cache --virtual .app-builddeps build-base \
18
+ && cd $APP_HOME && bundle install \
19
+ && cd $APP_HOME/crossdock && bundle install \
20
+ && apk del .app-builddeps
21
+
22
+ ADD . $APP_HOME
23
+
24
+ RUN chown -R nobody:nogroup $APP_HOME
25
+ USER nobody
26
+
27
+ WORKDIR $APP_HOME/crossdock
28
+
29
+ CMD ["bundle", "exec", "./server"]
30
+
31
+ EXPOSE 8080-8082
data/crossdock/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'jaeger-client', path: '../'
4
+ gem 'rack'
5
+ gem 'sinatra'
6
+ gem 'webrick', '~> 1.7'
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ jaeger-client (1.2.0)
5
+ opentracing (~> 0.3)
6
+ thrift
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ mustermann (1.1.1)
12
+ ruby2_keywords (~> 0.0.1)
13
+ opentracing (0.5.0)
14
+ rack (2.2.3)
15
+ rack-protection (2.1.0)
16
+ rack
17
+ ruby2_keywords (0.0.5)
18
+ sinatra (2.1.0)
19
+ mustermann (~> 1.0)
20
+ rack (~> 2.2)
21
+ rack-protection (= 2.1.0)
22
+ tilt (~> 2.0)
23
+ thrift (0.15.0)
24
+ tilt (2.0.10)
25
+ webrick (1.7.0)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ jaeger-client!
32
+ rack
33
+ sinatra
34
+ webrick (~> 1.7)
35
+
36
+ BUNDLED WITH
37
+ 2.3.5
@@ -0,0 +1,68 @@
1
+ version: '2'
2
+
3
+ services:
4
+ crossdock:
5
+ image: crossdock/crossdock
6
+ links:
7
+ - test_driver
8
+ - go
9
+ - python
10
+ - java
11
+ - ruby
12
+ environment:
13
+ - WAIT_FOR=test_driver,go,python,java,ruby
14
+ - WAIT_FOR_TIMEOUT=60s
15
+
16
+ - CALL_TIMEOUT=60s
17
+
18
+ - AXIS_CLIENT=go
19
+
20
+ - AXIS_S1NAME=go,python,java,ruby
21
+ - AXIS_SAMPLED=true,false
22
+ - AXIS_S2NAME=go,python,java,ruby
23
+ - AXIS_S2TRANSPORT=http
24
+ - AXIS_S3NAME=go,python,java,ruby
25
+ - AXIS_S3TRANSPORT=http
26
+
27
+ - BEHAVIOR_TRACE=client,s1name,sampled,s2name,s2transport,s3name,s3transport
28
+
29
+ - AXIS_TESTDRIVER=test_driver
30
+ - AXIS_SERVICES=ruby
31
+
32
+ - BEHAVIOR_ENDTOEND=testdriver,services
33
+
34
+ - REPORT=compact
35
+ go:
36
+ image: jaegertracing/xdock-go
37
+ ports:
38
+ - "8080-8082"
39
+
40
+ java:
41
+ image: jaegertracing/xdock-java
42
+ depends_on:
43
+ - jaeger-agent
44
+ ports:
45
+ - "8080-8082"
46
+
47
+ python:
48
+ image: jaegertracing/xdock-py
49
+ depends_on:
50
+ - jaeger-agent
51
+ ports:
52
+ - "8080-8082"
53
+
54
+ ruby:
55
+ build:
56
+ context: ../.
57
+ dockerfile: crossdock/Dockerfile
58
+ ports:
59
+ - "8080-8082"
60
+
61
+ test_driver:
62
+ image: jaegertracing/test-driver
63
+ depends_on:
64
+ - jaeger-query
65
+ - jaeger-collector
66
+ - jaeger-agent
67
+ ports:
68
+ - "8080"
@@ -0,0 +1,53 @@
1
+ version: '2'
2
+
3
+ services:
4
+ jaeger-collector:
5
+ image: jaegertracing/jaeger-collector
6
+ command: ["--es.num-shards=1", "--es.num-replicas=0", "--es.server-urls=http://elasticsearch:9200", "--collector.zipkin.host-port=:9411"]
7
+ ports:
8
+ - "14269"
9
+ - "14268:14268"
10
+ - "14250"
11
+ - "9411:9411"
12
+ environment:
13
+ - SPAN_STORAGE_TYPE=elasticsearch
14
+ - LOG_LEVEL=debug
15
+ restart: on-failure
16
+ depends_on:
17
+ - elasticsearch
18
+
19
+ jaeger-query:
20
+ image: jaegertracing/jaeger-query
21
+ command: ["--es.num-shards=1", "--es.num-replicas=0", "--es.server-urls=http://elasticsearch:9200"]
22
+ ports:
23
+ - "16686:16686"
24
+ - "16687"
25
+ environment:
26
+ - SPAN_STORAGE_TYPE=elasticsearch
27
+ - LOG_LEVEL=debug
28
+ restart: on-failure
29
+ depends_on:
30
+ - elasticsearch
31
+
32
+ jaeger-agent:
33
+ image: jaegertracing/jaeger-agent
34
+ command: ["--reporter.grpc.host-port=jaeger-collector:14250", "--reporter.grpc.retry.max=1000"]
35
+ ports:
36
+ - "5775:5775/udp"
37
+ - "6831:6831/udp"
38
+ - "6832:6832/udp"
39
+ - "5778:5778"
40
+ environment:
41
+ - LOG_LEVEL=debug
42
+ restart: on-failure
43
+ depends_on:
44
+ - jaeger-collector
45
+
46
+ elasticsearch:
47
+ image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.3
48
+ environment:
49
+ - discovery.type=single-node
50
+ ports:
51
+ - "9200:9200/tcp"
52
+
53
+
@@ -0,0 +1,35 @@
1
+ XDOCK_YAML=crossdock/docker-compose.yml
2
+ TRACETEST_THRIFT=idl/thrift/crossdock/tracetest.thrift
3
+ JAEGER_COMPOSE_URL=https://raw.githubusercontent.com/jaegertracing/jaeger/master/crossdock/jaeger-docker-compose.yml
4
+ XDOCK_JAEGER_YAML=crossdock/jaeger-docker-compose.yml
5
+
6
+ .PHONY: clean-compile
7
+ clean-compile:
8
+ find . -name '*.pyc' -exec rm {} \;
9
+
10
+ .PHONY: docker
11
+ docker: clean-compile crossdock-download-jaeger
12
+ docker build -f crossdock/Dockerfile -t jaeger-client-ruby .
13
+
14
+ .PHONY: crossdock
15
+ crossdock: ${TRACETEST_THRIFT} crossdock-download-jaeger
16
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) kill ruby
17
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) rm -f ruby
18
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) build ruby
19
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) run crossdock
20
+
21
+ .PHONY: crossdock-fresh
22
+ crossdock-fresh: ${TRACETEST_THRIFT} crossdock-download-jaeger
23
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) kill
24
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) rm --force
25
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) pull
26
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) build
27
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) run crossdock
28
+
29
+ .PHONY: crossdock-logs crossdock-download-jaeger
30
+ crossdock-logs:
31
+ docker-compose -f $(XDOCK_YAML) -f $(XDOCK_JAEGER_YAML) logs
32
+
33
+ .PHONY: crossdock-download-jaeger
34
+ crossdock-download-jaeger:
35
+ curl -o $(XDOCK_JAEGER_YAML) $(JAEGER_COMPOSE_URL)