aws-xray 0.38.0 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +24 -0
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/aws-xray.gemspec +1 -0
- data/lib/aws/xray/error_handlers.rb +20 -2
- data/lib/aws/xray/version.rb +1 -1
- metadata +18 -4
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10edc8cd3e2fb395697400fc98d9bf23e19612672fd4052292113d1d114aef5d
|
4
|
+
data.tar.gz: bb02ea13f5125df8ba5d7170efc42c71cccef6b3192a4f10227c1a3053f9718d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def8ffbb94e688612fbf9f123bb0808fcedaa83eb0e00b92ff29ee9cd4ec22e87e909c7f7893aa1690884b73c285defb564c2ca6863a4d63ee0f5775c633bce8
|
7
|
+
data.tar.gz: b7798a486132e087de6cd143639c89d9a004d2a898f886d27b3937f27c4abe13ba8227063c2b7e20b16719e6fbd374376ce1e572602001fd2661650d145da277
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
fail-fast: false
|
12
|
+
matrix:
|
13
|
+
ruby:
|
14
|
+
- '2.6'
|
15
|
+
- '2.7'
|
16
|
+
- '3.0'
|
17
|
+
name: Run test with Ruby ${{ matrix.ruby }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true
|
24
|
+
- run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# aws-xray
|
2
|
-
[![Build Status](https://
|
2
|
+
[![Build Status](https://github.com/cookpad/aws-xray/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/cookpad/aws-xray/actions/workflows/ci.yml)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/aws-xray.svg)](https://badge.fury.io/rb/aws-xray)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/github/taiki45/aws-xray/badge.svg)](https://coveralls.io/github/taiki45/aws-xray)
|
5
5
|
[![Inline docs](http://inch-ci.org/github/taiki45/aws-xray.svg?branch=master)](http://inch-ci.org/github/taiki45/aws-xray)
|
@@ -11,7 +11,7 @@ AWS X-Ray is a distributed tracing system. See more detail about AWS X-Ray at [o
|
|
11
11
|
If you want to know what is distributed tracing, what is problems behind, etc.., please refer [Google's Dapper paper](https://research.google.com/pubs/pub36356.html).
|
12
12
|
|
13
13
|
## Features
|
14
|
-
aws-xray has full
|
14
|
+
aws-xray has full features to build and send tracing data to AWS X-Ray.
|
15
15
|
|
16
16
|
- Propagation support in both single and multi thread environments.
|
17
17
|
- Instrumentation for major libraries.
|
data/aws-xray.gemspec
CHANGED
@@ -34,6 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency 'rsolr'
|
35
35
|
spec.add_development_dependency 'rspec'
|
36
36
|
spec.add_development_dependency 'sentry-raven'
|
37
|
+
spec.add_development_dependency 'sentry-ruby'
|
37
38
|
spec.add_development_dependency 'simplecov'
|
38
39
|
spec.add_development_dependency 'sqlite3'
|
39
40
|
spec.add_development_dependency 'webmock'
|
@@ -21,12 +21,30 @@ Error: #{error}
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
# Must be configured sentry-raven gem.
|
24
|
+
# Must be configured sentry-raven or sentry-ruby gem.
|
25
25
|
class ErrorHandlerWithSentry
|
26
|
+
class MissingSentryError < StandardError; end
|
27
|
+
|
28
|
+
def initialize
|
29
|
+
if !defined?(::Sentry) && !defined?(::Raven)
|
30
|
+
raise MissingSentryError.new('Must be installed sentry-raven or sentry-ruby gem')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
26
34
|
ERROR_LEVEL = 'warning'.freeze
|
27
35
|
|
28
36
|
def call(error, payload, host:, port:)
|
29
|
-
::Raven
|
37
|
+
if defined?(::Raven)
|
38
|
+
::Raven.capture_exception(
|
39
|
+
error,
|
40
|
+
level: ERROR_LEVEL,
|
41
|
+
extra: { 'payload' => payload, 'payload_raw' => payload.unpack('H*').first }
|
42
|
+
)
|
43
|
+
|
44
|
+
return
|
45
|
+
end
|
46
|
+
|
47
|
+
::Sentry.capture_exception(
|
30
48
|
error,
|
31
49
|
level: ERROR_LEVEL,
|
32
50
|
extra: { 'payload' => payload, 'payload_raw' => payload.unpack('H*').first }
|
data/lib/aws/xray/version.rb
CHANGED
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.39.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:
|
11
|
+
date: 2022-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: sentry-ruby
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: simplecov
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,9 +255,9 @@ executables: []
|
|
241
255
|
extensions: []
|
242
256
|
extra_rdoc_files: []
|
243
257
|
files:
|
258
|
+
- ".github/workflows/ci.yml"
|
244
259
|
- ".gitignore"
|
245
260
|
- ".rspec"
|
246
|
-
- ".travis.yml"
|
247
261
|
- CHANGELOG.md
|
248
262
|
- CONTRIBUTING.md
|
249
263
|
- Gemfile
|
@@ -310,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
324
|
- !ruby/object:Gem::Version
|
311
325
|
version: '0'
|
312
326
|
requirements: []
|
313
|
-
rubygems_version: 3.2.
|
327
|
+
rubygems_version: 3.2.32
|
314
328
|
signing_key:
|
315
329
|
specification_version: 4
|
316
330
|
summary: The unofficial X-Ray Tracing SDK for Ruby.
|