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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ebaad8e050c5b8f917c956164dd5a7769c1c4dee5dd5ddb0d771899f4f2d451
4
- data.tar.gz: 3574a9341bae80e8efef838287e6d0e42e8567c794ff5ffbbf45e4a5edbf29dc
3
+ metadata.gz: 10edc8cd3e2fb395697400fc98d9bf23e19612672fd4052292113d1d114aef5d
4
+ data.tar.gz: bb02ea13f5125df8ba5d7170efc42c71cccef6b3192a4f10227c1a3053f9718d
5
5
  SHA512:
6
- metadata.gz: 00fe3dd905a62456ebf301d7954650a9b53a4a8aff850372c2e278431ba6cca0de1ee9f7c822e8626d9da1ab6c8223356c8409ff9c180928893457b2594fcbd7
7
- data.tar.gz: 634b7769eaca9aab5f17a0784d2da4e1144f93a88afdea3dd40344ea42cbe17a72c08fa82cc0209ddb67688a54e9667984376e3f46a6b8edf3d9a2b92fd7d89c
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
@@ -1,6 +1,9 @@
1
1
  # CHANGELOG
2
2
  Only breaking or notable changes.
3
3
 
4
+ ## v0.39.0
5
+ - `ErrorHandlerWithSentry` now supports `sentry-ruby` gem.
6
+
4
7
  ## v0.38.0
5
8
  - aws/xray/hooks/active_record was removed because it's not usable due to too many traces
6
9
 
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # aws-xray
2
- [![Build Status](https://travis-ci.org/taiki45/aws-xray.svg?branch=master)](https://travis-ci.org/taiki45/aws-xray)
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 feautres to build and send tracing data to AWS X-Ray.
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.capture_exception(
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 }
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.38.0'.freeze
3
+ VERSION = '0.39.0'.freeze
4
4
  end
5
5
  end
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.38.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: 2021-03-22 00:00:00.000000000 Z
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.13
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.
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- branches:
4
- only:
5
- - master
6
- rvm:
7
- - 2.6
8
- - 2.7
9
- - 3.0