rails-tracer 0.4.2 → 0.4.3

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: 47d15fb58b1e35eb03ee6dcfdae89135fb675a95
4
- data.tar.gz: b53e9776a920f767ff5dea7b7ba83c99eef39f33
3
+ metadata.gz: 62a69e8a77d0cfb988e13b5f133c63889952db0c
4
+ data.tar.gz: 0b9ff703a9b38e02bbf7815379b5708140d04d64
5
5
  SHA512:
6
- metadata.gz: 24ddd388a81f98d535de9fa81ff9ac7943b7f5b974f32e16658858b2f548f377c0a91c0d8733239f50ce57ee73ad139f20a38035c8f19a656f21b3979ae033b2
7
- data.tar.gz: 171821793e81b7c845f9f2a1aa1a31bacfedbc8226a9b04261dcf52313ebbd5bfe78c7c6ae3e3296b07f4f26c935963a71faf8186e6b096f9557ec1a280b80c6
6
+ metadata.gz: 78932784bc5a6cf6f73471c5725f698ac42ebcf94623021c7ecbfe78b9e6319d37a7d3e14103bea1641e0ba807527404f84eb84bf41405f20e49bc30b8b8098a
7
+ data.tar.gz: 0ffe2b8adff7e3562ba7c810bec9a70b7556a10019a38b33384727cefacecd60f8d4c4a1d93010f5d216379cc551b3d14b2184b02ad4fd37aa59fab4f92a188e
@@ -1,3 +1,12 @@
1
+ ## v0.4.3
2
+
3
+ * Handle instrumentation exceptions and mark spans as failed [#21](https://github.com/iaintshine/ruby-rails-tracer/pull/21)
4
+
5
+ ## v0.4.2
6
+
7
+ * Test the gem with multiple Ruby versions 2.2+ [#20](https://github.com/iaintshine/ruby-rails-tracer/pull/20)
8
+ * Set explicit Ruby version requirement in gemspec.
9
+
1
10
  ## v0.4.1
2
11
 
3
12
  * Use tracing matchers in tests [#19](https://github.com/iaintshine/ruby-rails-tracer/pull/19)
@@ -20,6 +20,8 @@ module ActiveRecord
20
20
  cached: payload.fetch(:cached, false),
21
21
  connection_id: payload.fetch(:connection_id))
22
22
 
23
+ Rails::Tracer::SpanHelpers.set_error(span, payload[:exception_object]) if payload[:exception]
24
+
23
25
  span.finish(end_time: finish)
24
26
  end
25
27
 
@@ -45,6 +45,9 @@ module ActiveSupport
45
45
  start_time: start,
46
46
  **payload)
47
47
 
48
+
49
+ Rails::Tracer::SpanHelpers.set_error(span, payload[:exception_object]) if payload[:exception]
50
+
48
51
  span.finish(end_time: finish)
49
52
  end
50
53
 
@@ -0,0 +1,12 @@
1
+ module Rails
2
+ module Tracer
3
+ module SpanHelpers
4
+ class << self
5
+ def set_error(span, exception)
6
+ span.set_tag('error', true)
7
+ span.log(event: 'error', :'error.object' => exception)
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,4 @@
1
+ require "rails/span_helpers"
1
2
  require "rails/rack/tracer"
2
3
  require "rails/active_record/tracer"
3
4
  require "rails/active_support/cache/tracer"
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "rails-tracer"
7
- spec.version = "0.4.2"
7
+ spec.version = "0.4.3"
8
8
  spec.authors = ["iaintshine"]
9
9
  spec.email = ["bodziomista@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - iaintshine
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-01 00:00:00.000000000 Z
11
+ date: 2017-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentracing
@@ -285,6 +285,7 @@ files:
285
285
  - lib/rails/active_support/cache/dalli_tracer.rb
286
286
  - lib/rails/active_support/cache/tracer.rb
287
287
  - lib/rails/rack/tracer.rb
288
+ - lib/rails/span_helpers.rb
288
289
  - lib/rails/tracer.rb
289
290
  - rails-tracer.gemspec
290
291
  homepage: https://github.com/iaintshine/ruby-rails-tracer