aws-xray 0.21.0 → 0.21.1
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 +4 -4
- data/README.md +9 -0
- data/lib/aws/xray/segment.rb +3 -3
- data/lib/aws/xray/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a70cc56a3f1ef62528f19cbc02163bfdcdbddf60
|
4
|
+
data.tar.gz: e19299db3d72e8ab7079d5bbfbab55df9cad0e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45add7d52f5739bdf7d1005effffc1d715a66a7fdffe48211ea689ae3e289aad3c4603f57c5b6b153d6afd286640c0a5a6c35ab6061b6404002766d3c6ed4ab1
|
7
|
+
data.tar.gz: '08335f52809b4f289571c18f00556a49fdc9d95a30da7107b568de140f7765eb7b7d6b0a1415100efb36f05bfe5283e6ba6bacb7112d30fc2d33d6a5945c6e07'
|
data/README.md
CHANGED
@@ -120,6 +120,15 @@ response = Aws::Xray.overwrite(name: 'sns') do
|
|
120
120
|
end
|
121
121
|
```
|
122
122
|
|
123
|
+
#### rsolr hook
|
124
|
+
When you want to name solr requests, use this hook by require `aws/xray/hooks/rsolr`. The typical usecase is you use local haproxy to proxy to solr instances and you want to distinguish these requests from other reqeusts using local haproxy.
|
125
|
+
|
126
|
+
If you want to give a specific name, configure it:
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
Aws::Xray.config.solr_hook_name = 'solr-development'
|
130
|
+
```
|
131
|
+
|
123
132
|
### Multi threaded environment
|
124
133
|
Tracing context is thread local. To pass current tracing context, copy current tracing context:
|
125
134
|
|
data/lib/aws/xray/segment.rb
CHANGED
@@ -51,10 +51,10 @@ module Aws
|
|
51
51
|
set_http_response(status, length)
|
52
52
|
type = remote ? 'http_request_error' : 'http_response_error'
|
53
53
|
case status.to_i
|
54
|
-
when
|
55
|
-
cause = Cause.new(stack: caller, message: 'Got
|
54
|
+
when 429
|
55
|
+
cause = Cause.new(stack: caller, message: 'Got 429', type: type)
|
56
56
|
set_error(error: true, remote: remote, throttle: true, cause: cause)
|
57
|
-
when 400..
|
57
|
+
when 400..499
|
58
58
|
cause = Cause.new(stack: caller, message: 'Got 4xx', type: type)
|
59
59
|
set_error(error: true, remote: remote, cause: cause)
|
60
60
|
when 500..599
|
data/lib/aws/xray/version.rb
CHANGED