plain_apm 0.5.2 → 0.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00f09f66ee2dc9a76789adbfa6bb4634427a2c32c57780b131057f614782127e
4
- data.tar.gz: b66dc9db7fbbd925da8d4e96412ba54dc09019046db3ebde26da7944918f481b
3
+ metadata.gz: 3a8f0536583fe9d0f9e7f99214a9d79cffe852317716627d358e5b94fd786ab3
4
+ data.tar.gz: d118718d929c8ef6de1d1a746c6061b744a37fd08ee49bff5c917556af611860
5
5
  SHA512:
6
- metadata.gz: 144ab0a7599e0628ba9ab691c81a4c7af92949bed28f3cfbcd89e6e36c052e636a8339a0eebbafe69725476c5e350e97bed6e4911e19100e4bbf2bbd89fa5aba
7
- data.tar.gz: 7f4dca1052f789f92c3b3aa991681ced8492bb443d45acacf4dfeab46237d9b539a56f1ff607fcfad3549c4421c9871978296266850244f96dffd6bc579e0121
6
+ metadata.gz: 853aac9cc8a7bc97041fa2462e200153878c2e7ab703dcc25543d8b059f18f494e7b795b865d93c49a418fa3b1203bfc7d84f86f55d6792b0abc35aad075a30f
7
+ data.tar.gz: 8d446a123c4a66f6bc99a9586f414a0e135177266603795b09cc8ab131f6925a44d3606ad27707971eb349fc91f51d541b5e167a01d5e1236fccb3ebf6ccbd3a
@@ -4,6 +4,12 @@ module PlainApm
4
4
  module Extensions
5
5
  module Exceptions
6
6
  class Rack
7
+ # FIXME: This is duplicated for ErrorReporter
8
+ IGNORED_EXCEPTIONS = [
9
+ "Sidekiq::JobRetry::Skip", # Sidekiq uses exceptions for control flow.
10
+ "ActionController::RoutingError" # Rails unmapped route, raised before the request hits the app.
11
+ ].freeze
12
+
7
13
  def initialize(app)
8
14
  @app = app
9
15
  end
@@ -23,6 +29,8 @@ module PlainApm
23
29
  private
24
30
 
25
31
  def report_exception(e, env)
32
+ return if IGNORED_EXCEPTIONS.include?(e.class.name)
33
+
26
34
  event = {
27
35
  "source" => "rack_exceptions",
28
36
  "name" => "exception",
@@ -32,6 +40,14 @@ module PlainApm
32
40
  "params" => env["action_dispatch.request.parameters"]
33
41
  }
34
42
 
43
+ if e.cause
44
+ event.merge!({
45
+ "cause_class" => e.cause.class.name,
46
+ "cause_message" => e.cause.message,
47
+ "cause_backtrace" => e.cause.backtrace
48
+ })
49
+ end
50
+
35
51
  PlainApm::Agent.collect(event)
36
52
  end
37
53
  end
@@ -3,7 +3,8 @@ module PlainApm
3
3
  # Rails 7 error notification mechanism
4
4
  class ErrorReporter
5
5
  IGNORED_EXCEPTIONS = [
6
- "Sidekiq::JobRetry::Skip" # Sidekiq uses exceptions for control flow.
6
+ "Sidekiq::JobRetry::Skip", # Sidekiq uses exceptions for control flow.
7
+ "ActionController::RoutingError" # Rails unmapped route, raised before the request hits the app.
7
8
  ].freeze
8
9
 
9
10
  def install
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlainApm
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plain_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PlainAPM Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-13 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest