Class: Sentry::CustomStacktraceFrame
- Inherits:
-
Interface
- Object
- Interface
- Sentry::CustomStacktraceFrame
- Defined in:
- lib/fluent/plugin/out_sentry.rb
Instance Attribute Summary collapse
-
#context_line ⇒ Object
Returns the value of attribute context_line.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
-
#post_context ⇒ Object
Returns the value of attribute post_context.
-
#pre_context ⇒ Object
Returns the value of attribute pre_context.
Instance Method Summary collapse
-
#initialize(filename:, context_line:, pre_context: '', post_context: '', lineno: 1) ⇒ CustomStacktraceFrame
constructor
A new instance of CustomStacktraceFrame.
- #to_hash(*args) ⇒ Object
Constructor Details
#initialize(filename:, context_line:, pre_context: '', post_context: '', lineno: 1) ⇒ CustomStacktraceFrame
Returns a new instance of CustomStacktraceFrame.
120 121 122 123 124 125 126 |
# File 'lib/fluent/plugin/out_sentry.rb', line 120 def initialize(filename:, context_line:, pre_context: '', post_context: '', lineno: 1) @filename = filename @context_line = context_line @pre_context = pre_context.split("\n") @post_context = post_context.split("\n") @lineno = lineno end |
Instance Attribute Details
#context_line ⇒ Object
Returns the value of attribute context_line.
118 119 120 |
# File 'lib/fluent/plugin/out_sentry.rb', line 118 def context_line @context_line end |
#filename ⇒ Object
Returns the value of attribute filename.
118 119 120 |
# File 'lib/fluent/plugin/out_sentry.rb', line 118 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno.
118 119 120 |
# File 'lib/fluent/plugin/out_sentry.rb', line 118 def lineno @lineno end |
#post_context ⇒ Object
Returns the value of attribute post_context.
118 119 120 |
# File 'lib/fluent/plugin/out_sentry.rb', line 118 def post_context @post_context end |
#pre_context ⇒ Object
Returns the value of attribute pre_context.
118 119 120 |
# File 'lib/fluent/plugin/out_sentry.rb', line 118 def pre_context @pre_context end |
Instance Method Details
#to_hash(*args) ⇒ Object
128 129 130 131 132 133 134 |
# File 'lib/fluent/plugin/out_sentry.rb', line 128 def to_hash(*args) data = super(*args) data.delete(:pre_context) unless pre_context && !pre_context.empty? data.delete(:post_context) unless post_context && !post_context.empty? data.delete(:context_line) unless context_line && !context_line.empty? data end |