Class: Gitlab::ErrorTracking::Processor::GrpcErrorProcessor
- Inherits:
-
Raven::Processor
- Object
- Raven::Processor
- Gitlab::ErrorTracking::Processor::GrpcErrorProcessor
- Defined in:
- lib/gitlab/error_tracking/processor/grpc_error_processor.rb
Constant Summary collapse
- DEBUG_ERROR_STRING_REGEX =
RE2('(.*) debug_error_string:(.*)')
Instance Method Summary collapse
- #process(value) ⇒ Object
- #process_custom_fingerprint(value) ⇒ Object
-
#process_first_exception_value(value) ⇒ Object
Sentry can report multiple exceptions in an event.
Instance Method Details
#process(value) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gitlab/error_tracking/processor/grpc_error_processor.rb', line 9 def process(value) process_first_exception_value(value) process_custom_fingerprint(value) value end |
#process_custom_fingerprint(value) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/gitlab/error_tracking/processor/grpc_error_processor.rb', line 38 def process_custom_fingerprint(value) fingerprint = value[:fingerprint] return value unless custom_grpc_fingerprint?(fingerprint) , _ = split_debug_error_string(fingerprint[1]) fingerprint[1] = if end |
#process_first_exception_value(value) ⇒ Object
Sentry can report multiple exceptions in an event. Sanitize only the first one since that's what is used for grouping.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gitlab/error_tracking/processor/grpc_error_processor.rb', line 18 def process_first_exception_value(value) exceptions = value.dig(:exception, :values) return unless exceptions.is_a?(Array) entry = exceptions.first return unless entry.is_a?(Hash) = entry[:value] return unless .start_with?('GRPC::') , debug_str = split_debug_error_string() entry[:value] = if extra = value[:extra] || {} extra[:grpc_debug_error_string] = debug_str if debug_str end |