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
- MAX_NESTING =
10
- 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.
27 28 29 30 31 32 33 34 |
# File 'lib/sentry/breadcrumb.rb', line 27 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?
9 10 11 |
# File 'lib/sentry/breadcrumb.rb', line 9 def category @category end |
#data ⇒ Hash?
11 12 13 |
# File 'lib/sentry/breadcrumb.rb', line 11 def data @data end |
#level ⇒ String?
13 14 15 |
# File 'lib/sentry/breadcrumb.rb', line 13 def level @level end |
#message ⇒ String?
19 20 21 |
# File 'lib/sentry/breadcrumb.rb', line 19 def @message end |
#timestamp ⇒ Time, ...
15 16 17 |
# File 'lib/sentry/breadcrumb.rb', line 15 def @timestamp end |
#type ⇒ String?
17 18 19 |
# File 'lib/sentry/breadcrumb.rb', line 17 def type @type end |
Instance Method Details
#to_hash ⇒ Hash
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sentry/breadcrumb.rb', line 37 def to_hash { category: @category, data: serialized_data, level: @level, message: @message, timestamp: @timestamp, type: @type } end |