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 +4 -4
- data/README.md +8 -0
- data/lib/aws/xray/client.rb +5 -1
- data/lib/aws/xray/version.rb +1 -1
- data/prepare_release.rb +11 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed0623dec8afd758f243655af0b3fe43b95224b2
|
4
|
+
data.tar.gz: c3d3c662f3f7219cfef71feb92a4029fd02aa14b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
data/lib/aws/xray/client.rb
CHANGED
@@ -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:
|
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
|
data/lib/aws/xray/version.rb
CHANGED
data/prepare_release.rb
ADDED
@@ -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.
|
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-
|
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.
|
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.
|