Class: Sentry::Breadcrumb
- Inherits:
-
Object
- Object
- 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 ⇒ String?
- #data ⇒ Hash?
- #level ⇒ String?
- #message ⇒ String?
- #timestamp ⇒ Time, ...
- #type ⇒ String?
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 ⇒ Hash
Constructor Details
#initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil) ⇒ Breadcrumb
Returns a new instance of Breadcrumb.
26 27 28 29 30 31 32 33 |
# File 'lib/sentry/breadcrumb.rb', line 26 def initialize(category: nil, data: nil, message: nil, timestamp: nil, level: nil, type: nil) @category = category @data = data || {} @timestamp = || Sentry.utc_now.to_i @type = type self. = self.level = level end |
Instance Attribute Details
#category ⇒ String?
8 9 10 |
# File 'lib/sentry/breadcrumb.rb', line 8 def category @category end |
#data ⇒ Hash?
10 11 12 |
# File 'lib/sentry/breadcrumb.rb', line 10 def data @data end |
#level ⇒ String?
12 13 14 |
# File 'lib/sentry/breadcrumb.rb', line 12 def level @level end |
#message ⇒ String?
18 19 20 |
# File 'lib/sentry/breadcrumb.rb', line 18 def @message end |
#timestamp ⇒ Time, ...
14 15 16 |
# File 'lib/sentry/breadcrumb.rb', line 14 def @timestamp end |
#type ⇒ String?
16 17 18 |
# File 'lib/sentry/breadcrumb.rb', line 16 def type @type end |
Instance Method Details
#to_hash ⇒ Hash
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sentry/breadcrumb.rb', line 36 def to_hash { category: @category, data: serialized_data, level: @level, message: @message, timestamp: @timestamp, type: @type } end |