Class: Sentry::Breadcrumb
- Defined in:
- lib/sentry/breadcrumb.rb,
lib/sentry/breadcrumb/sentry_logger.rb
Defined Under Namespace
Modules: SentryLogger
Constant Summary collapse
- DATA_SERIALIZATION_ERROR_MESSAGE =
"[data were removed due to serialization issues]"
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#data ⇒ Object
Returns the value of attribute data.
-
#level ⇒ Object
Returns the value of attribute level.
-
#message ⇒ Object
Returns the value of attribute message.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil) ⇒ Breadcrumb
constructor
A new instance of Breadcrumb.
- #to_hash ⇒ Object
Constructor Details
#initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil) ⇒ Breadcrumb
Returns a new instance of Breadcrumb.
7 8 9 10 11 12 13 14 |
# File 'lib/sentry/breadcrumb.rb', line 7 def initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil) @category = category @data = data || {} @level = level = = || Sentry.utc_now.to_i @type = type end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def category @category end |
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def data @data end |
#level ⇒ Object
Returns the value of attribute level.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def level @level end |
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/sentry/breadcrumb.rb', line 5 def type @type end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sentry/breadcrumb.rb', line 16 def to_hash { category: @category, data: serialized_data, level: @level, message: , timestamp: , type: @type } end |