Class: Instana::Activators::Graphql
Instance Method Summary
collapse
#call, call, inherited, start
Instance Method Details
#can_instrument? ⇒ Boolean
7
8
9
10
11
|
# File 'lib/instana/activators/graphql.rb', line 7
def can_instrument?
defined?(::GraphQL::Schema) &&
defined?(GraphQL::Tracing::PlatformTracing) &&
Instana.config[:graphql][:enabled]
end
|
#instrument ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/instana/activators/graphql.rb', line 13
def instrument
require 'instana/instrumentation/graphql'
::GraphQL::Schema.use(::Instana::Instrumentation::GraphqlTracing)
true
end
|