Class: OpenTelemetry::Instrumentation::GraphQL::Instrumentation
- Inherits:
-
Base
- Object
- Base
- OpenTelemetry::Instrumentation::GraphQL::Instrumentation
- Defined in:
- lib/opentelemetry/instrumentation/graphql/instrumentation.rb
Overview
The Instrumentation class contains logic to detect and install the GraphQL instrumentation
Instance Method Summary collapse
-
#schemas ⇒ Object
Supported configuration keys for the install config hash:.
- #supports_legacy_tracer? ⇒ Boolean
- #supports_new_tracer? ⇒ Boolean
Instance Method Details
#schemas ⇒ Object
Supported configuration keys for the install config hash:
The enable_platform_field key expects a boolean value, and enables the tracing of "execute_field" and "execute_field_lazy".
The enable_platform_authorized key expects a boolean value, and enables the tracing of "authorized" and "authorized_lazy".
The enable_platform_resolve_type key expects a boolean value, and enables the tracing of "resolve_type" and "resolve_type_lazy".
The legacy_platform_span_names key expects a boolean value, and controls if platform tracing (field/authorized/resolve_type) should use the legacy span names (e.g. "MyType.myField") or the new normalized span names (e.g. "graphql.execute_field").
The schemas key expects an array of Schemas, and is used to specify which schemas are to be instrumented. If this value is not supplied the default behaviour is to instrument all schemas.
63 |
# File 'lib/opentelemetry/instrumentation/graphql/instrumentation.rb', line 63 option :schemas, default: [], validate: :array |
#supports_legacy_tracer? ⇒ Boolean
36 37 38 |
# File 'lib/opentelemetry/instrumentation/graphql/instrumentation.rb', line 36 def supports_legacy_tracer? Gem::Requirement.new('!= 2.0.18').satisfied_by?(gem_version) end |
#supports_new_tracer? ⇒ Boolean
40 41 42 |
# File 'lib/opentelemetry/instrumentation/graphql/instrumentation.rb', line 40 def supports_new_tracer? Gem::Requirement.new('>= 2.0.19').satisfied_by?(gem_version) end |