Class: Skylight::Core::Probes::GraphQL::Probe Private
- Inherits:
-
Object
- Object
- Skylight::Core::Probes::GraphQL::Probe
- Defined in:
- lib/skylight/core/probes/graphql.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
- #install ⇒ Object private
- #safe_constantize(klass_name) ⇒ Object private
Instance Method Details
#install ⇒ 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.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/skylight/core/probes/graphql.rb', line 19 def install tracing_klass_name = "::GraphQL::Tracing::ActiveSupportNotificationsTracing" klasses_to_probe = %w( ::GraphQL::Execution::Multiplex ::GraphQL::Query ) return unless ([tracing_klass_name] + klasses_to_probe).all?(&method(:safe_constantize)) klasses_to_probe.each do |klass_name| safe_constantize(klass_name).prepend(Instrumentation) end end |
#safe_constantize(klass_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.
33 34 35 |
# File 'lib/skylight/core/probes/graphql.rb', line 33 def safe_constantize(klass_name) Skylight::Core::Util::Inflector.safe_constantize(klass_name) end |