Module: Skylight::Probes::DelayedJob Private
- Defined in:
- lib/skylight/probes/delayed_job.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: InstrumentationProxy, Probe
Class Method Summary collapse
- .payload_object_name(payload_object) ⇒ Object private
- .payload_object_source_meta(payload_object) ⇒ Object private
Class Method Details
.payload_object_name(payload_object) ⇒ 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.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/skylight/probes/delayed_job.rb', line 59 def self.payload_object_name(payload_object) if payload_object.is_a?(::Delayed::PerformableMethod) payload_object.display_name else # In the case of ActiveJob-wrapped jobs, there is quite a bit of job-specific metadata # in `job.name`, which would break aggregation and potentially leak private data in job args. # Use class name instead to avoid this. payload_object.class.name end rescue StandardError UNKNOWN end |
.payload_object_source_meta(payload_object) ⇒ 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.
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/skylight/probes/delayed_job.rb', line 72 def self.(payload_object) if payload_object.is_a?(::Delayed::PerformableMethod) if payload_object.object.is_a?(Module) [:class_method, payload_object.object.name, payload_object.method_name.to_s] else [:instance_method, payload_object.object.class.name, payload_object.method_name.to_s] end else [:instance_method, payload_object.class.name, "perform"] end end |