gitlab-fluent-plugin-detect-exceptions 0.0.15 → 0.0.16

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: f09ee87a8a03c6b398a42c0bcd4beedc92ed8ae0ea6a22ba5436d92485faeb27
4
- data.tar.gz: 21fcb6d72a7d3df71d3087f7bfb0de17807df73670a554f58666049c65c7f81c
3
+ metadata.gz: 1bdccb9b31b1be4d791707fda73fb523fe5f34ae17f701c684b4f42ea546b61f
4
+ data.tar.gz: fbf55dc7e44428be31762c10995add753588e6a32398f5a8ff6a7d250339e63c
5
5
  SHA512:
6
- metadata.gz: 8aff95c7c068ea0905735bfb76c4577a259cba60685ac25d7f7be3a0c62403c8c7e2bfd4ea4fa6fb7f03362a808da7d36b04305a2b0107c72669dc99615b87c0
7
- data.tar.gz: 6b49f2acbc81beb5086fc9ea1190cde7fde9071c7725da812d9c27b932762efa58de30d78f173c2ddecd521342767d53468d19974db0b60693541cdaecb85fd5
6
+ metadata.gz: 277d2ce43ba487c1c30bec4986d02262be044804729b2e325ff275a2ec2c84ffc0985aef3f620bcb716e7fb6a8b5a24c8b69fa5f9ee35c855db5b08151db5f2d
7
+ data.tar.gz: 6a0d183a6c91ed70183e367442b2763ec36f2aec49cbf0e23fee1466081a671cc4c93e71fbd784b60415cbd4df82e8c44643d5c9838d2ab871156fee2d8f2445
data/Gemfile.lock CHANGED
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-detect-exceptions (0.0.14)
4
+ gitlab-fluent-plugin-detect-exceptions (0.0.15)
5
5
  fluentd (>= 0.10)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.2)
11
+ byebug (11.1.3)
11
12
  concurrent-ruby (1.1.10)
12
13
  cool.io (1.7.1)
13
14
  flexmock (2.3.6)
@@ -39,7 +40,7 @@ GEM
39
40
  ruby-progressbar (~> 1.7)
40
41
  unicode-display_width (~> 1.0, >= 1.0.1)
41
42
  ruby-progressbar (1.11.0)
42
- serverengine (2.3.0)
43
+ serverengine (2.3.1)
43
44
  sigdump (~> 0.2.2)
44
45
  sigdump (0.2.4)
45
46
  strptime (0.2.5)
@@ -55,10 +56,12 @@ GEM
55
56
 
56
57
  PLATFORMS
57
58
  arm64-darwin-21
59
+ arm64-darwin-22
58
60
 
59
61
  DEPENDENCIES
62
+ byebug
60
63
  flexmock (~> 2.0)
61
- fluent-plugin-detect-exceptions!
64
+ gitlab-fluent-plugin-detect-exceptions!
62
65
  rake (~> 10.3)
63
66
  rubocop (= 0.42.0)
64
67
  test-unit (~> 3.0)
@@ -11,7 +11,7 @@ eos
11
11
  gem.homepage = \
12
12
  'https://gitlab.com/gitlab-org/ruby/gems/gitlab-fluent-plugin-detect-exceptions'
13
13
  gem.license = 'Apache-2.0'
14
- gem.version = '0.0.15'
14
+ gem.version = '0.0.16'
15
15
  gem.authors = ['Stackdriver Agents']
16
16
  gem.email = ['stackdriver-agents@google.com']
17
17
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -115,48 +115,48 @@ module Fluent
115
115
 
116
116
  RUBY_SEGFAULT_RULES = [
117
117
  rule(:start_state,
118
- /:\d+:\s\[BUG\] Segmentation fault/, :ruby_description),
119
- rule(:ruby_description, /^ruby\n*/, :ruby_description_end),
120
- rule(:ruby_description_end, /\n$/, :ruby_control_frame_begin),
121
- rule(:ruby_control_frame_begin,
118
+ /:\d+:\s\[BUG\] Segmentation fault/, :ruby_segfault),
119
+ rule(:ruby_segfault, /^ruby\n*/, :ruby_segfault),
120
+ rule(:ruby_segfault, /^\n$/, :ruby_segfault),
121
+ rule(:ruby_segfault,
122
122
  /^-- Control frame information --/, :ruby_control_frames),
123
123
  rule(:ruby_control_frames, /^c:/, :ruby_control_frames),
124
- rule(:ruby_control_frames, /^\n$/, :ruby_level_backtrace_frame_start),
125
- rule(:ruby_level_backtrace_frame_start,
126
- /-- Ruby level backtrace information --/,
124
+ rule(:ruby_control_frames, /^\n$/, :ruby_segfault),
125
+ rule([:ruby_segfault, :ruby_control_frames],
126
+ /^-- Ruby level backtrace information --/,
127
127
  :ruby_level_backtrace_frames),
128
128
  rule(:ruby_level_backtrace_frames, /:\d+:in /,
129
129
  :ruby_level_backtrace_frames),
130
- rule(:ruby_level_backtrace_frames, /^\n$/, :ruby_level_backtrace_end),
131
- rule(:ruby_level_backtrace_end,
130
+ rule(:ruby_level_backtrace_frames, /^\n$/, :ruby_segfault),
131
+ rule([:ruby_segfault, :ruby_level_backtrace_frames],
132
132
  /^-- Machine register context --/, :ruby_machine_registers),
133
133
  rule(:ruby_machine_registers, /: /, :ruby_machine_registers),
134
- rule(:ruby_machine_registers, /^\n$/, :ruby_machine_registers_end),
135
- rule(:ruby_machine_registers_end,
134
+ rule(:ruby_machine_registers, /^\n*$/, :ruby_segfault),
135
+ rule([:ruby_segfault, :ruby_machine_registers],
136
136
  /^-- C level backtrace information --/,
137
137
  :ruby_c_level_backtrace_frames),
138
138
  rule(:ruby_c_level_backtrace_frames, /\[.*\]/,
139
139
  :ruby_c_level_backtrace_frames),
140
140
  rule(:ruby_c_level_backtrace_frames, / .*:\d+$/,
141
141
  :ruby_c_level_backtrace_frames),
142
- rule(:ruby_c_level_backtrace_frames, /^\n$/,
143
- :ruby_c_level_backtrace_end),
144
- rule(:ruby_c_level_backtrace_end,
142
+ rule(:ruby_c_level_backtrace_frames, /^\n$/, :ruby_segfault),
143
+ rule([:ruby_segfault, :ruby_c_level_backtrace_frames],
145
144
  /^-- Other runtime information/, :ruby_other_runtime_info),
146
- rule(:ruby_other_runtime_info, /^\n$/, :ruby_other_runtime_info),
145
+ rule(:ruby_other_runtime_info, /^\n*$/, :ruby_other_runtime_info),
147
146
  rule(:ruby_other_runtime_info, /^* Loaded script:/, :ruby_loaded_script),
148
147
  rule(:ruby_loaded_script, /^\n$/, :ruby_loaded_features),
149
- rule(:ruby_loaded_features, /^* Loaded features:/, :ruby_loaded_features),
148
+ rule([:ruby_loaded_features, :ruby_loaded_script],
149
+ /^* Loaded features:/, :ruby_loaded_features),
150
150
  rule(:ruby_loaded_features, /^\n$/, :ruby_loaded_features_frames),
151
- rule(:ruby_loaded_features_frames,
151
+ rule([:ruby_loaded_features_frames, :ruby_loaded_features],
152
152
  /\d/, :ruby_loaded_features_frames),
153
153
  rule(:ruby_loaded_features_frames,
154
154
  /^\n$/, :ruby_process_memory_map),
155
- rule(:ruby_process_memory_map,
155
+ rule([:ruby_process_memory_map, :ruby_loaded_features_frames],
156
156
  /^* Process memory map:/, :ruby_process_memory_map),
157
157
  rule(:ruby_process_memory_map,
158
158
  /^\n$/, :ruby_process_memory_map_frames),
159
- rule(:ruby_process_memory_map_frames,
159
+ rule([:ruby_process_memory_map_frames, :ruby_process_memory_map],
160
160
  /\-/, :ruby_process_memory_map_frames),
161
161
  rule(:ruby_process_memory_map_frames, /^\n$/, :start_state)
162
162
  ].freeze
@@ -905,6 +905,7 @@ END
905
905
  def test_ruby
906
906
  check_exception(RUBY_EXC, false)
907
907
  check_exception(RUBY_SEGFAULT_EXC, true)
908
+ check_exception(strip_blank_lines(RUBY_SEGFAULT_EXC), true)
908
909
  check_exception(RAILS_EXC, false)
909
910
  end
910
911
 
@@ -980,6 +981,10 @@ END
980
981
  check_no_multiline(detector, JAVA_EXC_PART2)
981
982
  end
982
983
 
984
+ def strip_blank_lines(str)
985
+ str.split("\n").reject(&:empty?).join("\n") + "\n\n"
986
+ end
987
+
983
988
  def feed_lines(buffer, *messages)
984
989
  messages.each do |m|
985
990
  m.each_line do |line|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-fluent-plugin-detect-exceptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stackdriver Agents
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-22 00:00:00.000000000 Z
11
+ date: 2023-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.3.26
126
+ rubygems_version: 3.4.3
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: fluentd output plugin for combining stack traces as multi-line JSON logs