barbeque_client 0.8.2 → 0.9.0

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: bc30436c86b5803d4115b9ce2504f539f0f54ccb
4
- data.tar.gz: bd2584aef532bc467e3007fa9644fdaa772652e1
3
+ metadata.gz: 748ec0cb5187daebfd967612382bab3a5ad03f78
4
+ data.tar.gz: 288db468ba9799658c041b5dc93c67ea94a91a35
5
5
  SHA512:
6
- metadata.gz: 59efbcd9e7d0fd9f0355d039431a7add65654d99ccdd9c53238ea87c78db1693d368a26cb33c38b83a2e19da814aac8797fd8d701dc42d6f59bcd19c2d293f61
7
- data.tar.gz: 48f79996b82b02162c715acff4c72df69e2d59a80e2cb7648f2c238f11a4e446799eefe84117361973f79570723be081dfdc9f547aac33547a0983f42bf8b0bb
6
+ metadata.gz: 75408cd176b18f791e9db63cc89703c9e8bd76f14a09f7fb9baea0aa89f11d7e05e75fc9f717774efc533d399309cae9fa711b3df6491558e7ebfe423a22e029
7
+ data.tar.gz: 2acbd9be2231e8ae3c9fbec2665634f0dac79c1e712592c79a79ac02d6c9aae2ab02c8ba97eee5265c00118aa3a718b4d195c5428a2e8699f8d0415b7fcb110e
data/README.md CHANGED
@@ -39,3 +39,14 @@ execution.status #=> "pending"
39
39
  message_id = "a3c653c1-335e-4d4d-a6f9-eb91c0253d02"
40
40
  BarbequeClient.status(message_id: message_id) #=> "success"
41
41
  ```
42
+
43
+ ### Distributed tracing
44
+ Configure `tracing` option. Pick one of supported tracers.
45
+ See more detail in https://github.com/cookpad/garage_client#tracing.
46
+
47
+ ```
48
+ BarbequeClient.configure do |config|
49
+ # ...
50
+ config.tracing = { tracer: 'aws-xray', service: 'barbeque' }
51
+ end
52
+ ```
@@ -45,6 +45,7 @@ module BarbequeClient
45
45
  application: config.application,
46
46
  default_queue: config.default_queue,
47
47
  endpoint: config.endpoint,
48
+ tracing: config.tracing,
48
49
  )
49
50
  end
50
51
  end
@@ -3,10 +3,11 @@ require 'json'
3
3
 
4
4
  module BarbequeClient
5
5
  class Client
6
- def initialize(application:, default_queue:, endpoint:)
6
+ def initialize(application:, default_queue:, endpoint:, tracing: {})
7
7
  @application = application
8
8
  @default_queue = default_queue
9
9
  @endpoint = endpoint
10
+ @tracing = tracing
10
11
  end
11
12
 
12
13
  # @param [String] job - Job name to enqueue.
@@ -50,10 +51,13 @@ module BarbequeClient
50
51
  private
51
52
 
52
53
  def garage_client
53
- @garage_client ||= GarageClient::Client.new(
54
- endpoint: @endpoint,
55
- path_prefix: '/',
56
- )
54
+ @garage_client ||= GarageClient::Client.new(garage_client_option)
55
+ end
56
+
57
+ def garage_client_option
58
+ option = { endpoint: @endpoint, path_prefix: '/' }
59
+ option[:tracing] = @tracing if @tracing[:tracer]
60
+ option
57
61
  end
58
62
  end
59
63
  end
@@ -8,6 +8,7 @@ module BarbequeClient
8
8
  application
9
9
  default_queue
10
10
  endpoint
11
+ tracing
11
12
  ]
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module BarbequeClient
2
- VERSION = '0.8.2'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barbeque_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-17 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: garage_client
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.6.10
159
+ rubygems_version: 2.6.11
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Barbeque client for Ruby