Module: Datadog::Contrib::ActiveSupport::Notifications::Event::ClassMethods
- Defined in:
- lib/ddtrace/contrib/active_support/notifications/event.rb
Overview
Redefines some class behaviors for a Subscriber to make it a bit simpler for an Event.
Constant Summary collapse
- DEFAULT_TRACER =
-> { Datadog.tracer }
Instance Method Summary collapse
- #span_options ⇒ Object
- #subscribe(pattern = nil, span_name = nil, options = nil, tracer = nil) ⇒ Object
- #subscribe! ⇒ Object
- #subscription(span_name = nil, options = nil, tracer = nil) ⇒ Object
- #supported? ⇒ Boolean
- #tracer ⇒ Object
Instance Method Details
#span_options ⇒ Object
52 53 54 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 52 def {} end |
#subscribe(pattern = nil, span_name = nil, options = nil, tracer = nil) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 36 def subscribe(pattern = nil, span_name = nil, = nil, tracer = nil) if supported? super( pattern || event_name, span_name || self.span_name, || , tracer || self.tracer, &method(:process) ) end end |
#subscribe! ⇒ Object
23 24 25 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 23 def subscribe! super end |
#subscription(span_name = nil, options = nil, tracer = nil) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 27 def subscription(span_name = nil, = nil, tracer = nil) super( span_name || self.span_name, || , tracer || self.tracer, &method(:process) ) end |
#supported? ⇒ Boolean
48 49 50 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 48 def supported? true end |
#tracer ⇒ Object
56 57 58 |
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 56 def tracer DEFAULT_TRACER end |