Class: Labkit::Tracing::Rails::ActionView::Subscriber Private
- Inherits:
-
Object
- Object
- Labkit::Tracing::Rails::ActionView::Subscriber
- Includes:
- TracingCommon
- Defined in:
- lib/labkit/tracing/rails/action_view/subscriber.rb
Overview
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.
ActionView bridges action view notifications to the distributed tracing subsystem
Constant Summary collapse
- RENDER_TEMPLATE_NOTIFICATION_TOPIC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"render_template.action_view"- RENDER_COLLECTION_NOTIFICATION_TOPIC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"render_collection.action_view"- RENDER_PARTIAL_NOTIFICATION_TOPIC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"render_partial.action_view"
Class Method Summary collapse
-
.instrument ⇒ Object
private
Instruments Rails ActionView events for opentracing.
Class Method Details
.instrument ⇒ 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.
Instruments Rails ActionView events for opentracing. Returns a lambda, which, when called will unsubscribe from the notifications
18 19 20 21 22 23 24 25 26 |
# File 'lib/labkit/tracing/rails/action_view/subscriber.rb', line 18 def self.instrument subscriptions = [ ::ActiveSupport::Notifications.subscribe(RENDER_TEMPLATE_NOTIFICATION_TOPIC, RenderTemplateInstrumenter.new), ::ActiveSupport::Notifications.subscribe(RENDER_COLLECTION_NOTIFICATION_TOPIC, RenderCollectionInstrumenter.new), ::ActiveSupport::Notifications.subscribe(RENDER_PARTIAL_NOTIFICATION_TOPIC, RenderPartialInstrumenter.new), ] create_unsubscriber subscriptions end |