Class: Skylight::Probes::DelayedJob::InstrumentationProxy Private
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Skylight::Probes::DelayedJob::InstrumentationProxy
- Defined in:
- lib/skylight/probes/delayed_job.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#display_name ⇒ Object
private
Used by Delayed::Backend::Base to determine Job#name.
- #perform ⇒ Object private
Instance Method Details
#display_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Used by Delayed::Backend::Base to determine Job#name
110 111 112 |
# File 'lib/skylight/probes/delayed_job.rb', line 110 def display_name __getobj__.respond_to?(:display_name) ? __getobj__.display_name : __getobj__.class.name end |
#perform ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/skylight/probes/delayed_job.rb', line 85 def perform if (trace = Skylight.instrumenter&.current_trace) if trace.endpoint == UNKNOWN # At this point, deserialization was, by definition, successful. # So it'd be safe to set the endpoint name based on the payload # object here. trace.endpoint = Skylight::Probes::DelayedJob.payload_object_name(__getobj__) end = Skylight::Probes::DelayedJob.(__getobj__) opts = { category: "app.delayed_job.job", title: format_source(*), meta: { source_location_hint: }, internal: true } Skylight.instrument(opts) { __getobj__.perform } end end |