aws-xray 0.5.0 → 0.6.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: 3e5e47e29f1d7482fb968d3a57571b1d1d7e0561
4
- data.tar.gz: 70d09feb59fa427b22ff75790d6fdf88e3ed27cf
3
+ metadata.gz: ed0623dec8afd758f243655af0b3fe43b95224b2
4
+ data.tar.gz: c3d3c662f3f7219cfef71feb92a4029fd02aa14b
5
5
  SHA512:
6
- metadata.gz: 98f0a2890cdedfa4870dc82416d895c244f9202a645f655280e500a952b164e9e756e26609b8d846bc72fe86660fe4fec275d22bc73fbc2421ee1ffcb2cc825e
7
- data.tar.gz: 80517c9848efd704189bb057703bdcd04ddba7c0ad3cd84e70b4c49b91f16c197905bc3c849b9a9a7f03128168a7b7f5de4e90b642430aca0618e159897fe9b8
6
+ metadata.gz: 7e33e09714c5646804d0378d9f212960870662629f96aefa5386b970f7bd1ed229e9ae81e7f9a755e3a33d03996490f432dc0d941300a66064f28cdc5691f755
7
+ data.tar.gz: a26253e13ef30f84be6c130cf50ef1e254d30fd4d5e962aafaa2101247bf9172a8a9ab5343808646a96d55b8f9777a1230282ff7fd359864a2287734c2f15184
data/README.md CHANGED
@@ -98,6 +98,14 @@ end
98
98
  ```
99
99
 
100
100
  ## Configurations
101
+ ### Xray agent location
102
+ In container environments, we often run xray agent container beside application container.
103
+ For that case, pass `AWS_XRAY_LOCATION` environment variable to container to specify host and port of xray agent.
104
+
105
+ ```
106
+ docker run --link xray:xray --env AWS_XRAY_LOCATION=xray:2000 my-application
107
+ ```
108
+
101
109
  ### Recording pplication version
102
110
  aws-xray automatically tries to set application version by reading `app_root/REVISION` file.
103
111
  If you want to set another version, set it with:
@@ -3,10 +3,14 @@ require 'socket'
3
3
  module Aws
4
4
  module Xray
5
5
  class Client
6
+ option = ENV['AWS_XRAY_LOCATION']
7
+ DEFAULT_HOST = option ? option.split(':').first : 'localhost'
8
+ DEFAULT_PORT = option ? Integer(option.split(':').last) : 2000
9
+
6
10
  # sock is for test
7
11
  #
8
12
  # XXX: keep options for implmenting copying later.
9
- def initialize(host: '127.0.0.1', port: 2000, sock: nil)
13
+ def initialize(host: DEFAULT_HOST, port: DEFAULT_PORT, sock: nil)
10
14
  @host, @port = host, port
11
15
  @sock = sock || UDPSocket.new
12
16
  end
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
@@ -0,0 +1,11 @@
1
+ after = ARGV.first
2
+ if after.nil?
3
+ $stderr.puts "Example: ruby #{__FILE__} v0.6.0"
4
+ exit 1
5
+ end
6
+
7
+ path = 'lib/aws/xray/version.rb'
8
+ version_str = after.gsub('v', '')
9
+ File.write(path, File.read(path).gsub(/VERSION = '.+'$/, "VERSION = '#{version_str}'"))
10
+ system('git', 'add', path)
11
+ system('git', 'commit', '-m', after)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-xray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-27 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -126,6 +126,7 @@ files:
126
126
  - lib/aws/xray/trace.rb
127
127
  - lib/aws/xray/version.rb
128
128
  - lib/aws/xray/version_detector.rb
129
+ - prepare_release.rb
129
130
  homepage: https://github.com/taiki45/aws-xray
130
131
  licenses:
131
132
  - MIT
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
147
  version: '0'
147
148
  requirements: []
148
149
  rubyforge_project:
149
- rubygems_version: 2.5.2
150
+ rubygems_version: 2.6.11
150
151
  signing_key:
151
152
  specification_version: 4
152
153
  summary: The unofficial X-Ray Tracing SDK for Ruby.