Module: Sentry::Rails::Breadcrumb::MonotonicActiveSupportLogger
Constant Summary
InstrumentPayloadCleanupHelper::IGNORED_DATA_TYPES
Class Method Summary
collapse
cleanup_data
Class Method Details
.add(name, started, _finished, _unique_id, data) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/sentry/rails/breadcrumb/monotonic_active_support_logger.rb', line 12
def add(name, started, _finished, _unique_id, data)
return if name.start_with?("!")
if data.is_a?(Hash)
data = data.dup
cleanup_data(data)
end
crumb = Sentry::Breadcrumb.new(
data: data,
category: name,
timestamp: started.to_i
)
Sentry.add_breadcrumb(crumb)
end
|
.detach ⇒ Object
39
40
41
|
# File 'lib/sentry/rails/breadcrumb/monotonic_active_support_logger.rb', line 39
def detach
::ActiveSupport::Notifications.unsubscribe(@subscriber)
end
|
.inject ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'lib/sentry/rails/breadcrumb/monotonic_active_support_logger.rb', line 30
def inject
@subscriber = ::ActiveSupport::Notifications.monotonic_subscribe(/.*/) do |name, started, finished, unique_id, data|
if started.is_a?(Float)
add(name, started, finished, unique_id, data)
end
end
end
|