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.
116 117 118 119 120 121 122 |
# File 'lib/fluent/plugin/out_sentry.rb', line 116 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.
114 115 116 |
# File 'lib/fluent/plugin/out_sentry.rb', line 114 def context_line @context_line end |
#filename ⇒ Object
Returns the value of attribute filename.
114 115 116 |
# File 'lib/fluent/plugin/out_sentry.rb', line 114 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno.
114 115 116 |
# File 'lib/fluent/plugin/out_sentry.rb', line 114 def lineno @lineno end |
#post_context ⇒ Object
Returns the value of attribute post_context.
114 115 116 |
# File 'lib/fluent/plugin/out_sentry.rb', line 114 def post_context @post_context end |
#pre_context ⇒ Object
Returns the value of attribute pre_context.
114 115 116 |
# File 'lib/fluent/plugin/out_sentry.rb', line 114 def pre_context @pre_context end |
Instance Method Details
#to_hash(*args) ⇒ Object
124 125 126 127 128 129 130 |
# File 'lib/fluent/plugin/out_sentry.rb', line 124 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 |