Module: GraphQL::Tracing::CallLegacyTracers
- Included in:
- LegacyTrace
- Defined in:
- lib/graphql/tracing/call_legacy_tracers.rb
Overview
This trace class calls legacy-style tracer with payload hashes.
New-style trace_with
modules significantly reduce the overhead of tracing,
but that advantage is lost when legacy-style tracers are also used (since the payload hashes are still constructed).
Instance Method Summary collapse
-
#analyze_multiplex(multiplex:) ⇒ Object
-
#analyze_query(query:) ⇒ Object
-
#authorized(query:, type:, object:) ⇒ Object
-
#authorized_lazy(query:, type:, object:) ⇒ Object
-
#execute_field(field:, query:, ast_node:, arguments:, object:) ⇒ Object
-
#execute_field_lazy(field:, query:, ast_node:, arguments:, object:) ⇒ Object
-
#execute_multiplex(multiplex:) ⇒ Object
-
#execute_query(query:) ⇒ Object
-
#execute_query_lazy(query:, multiplex:) ⇒ Object
-
#lex(query_string:) ⇒ Object
-
#parse(query_string:) ⇒ Object
-
#resolve_type(query:, type:, object:) ⇒ Object
-
#resolve_type_lazy(query:, type:, object:) ⇒ Object
-
#validate(query:, validate:) ⇒ Object
Instance Method Details
#analyze_multiplex(multiplex:) ⇒ Object
21 22 23 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 21 def analyze_multiplex(multiplex:) multiplex.trace("analyze_multiplex", { multiplex: multiplex }) { super } end |
#analyze_query(query:) ⇒ Object
25 26 27 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 25 def analyze_query(query:) query.trace("analyze_query", { query: query }) { super } end |
#authorized(query:, type:, object:) ⇒ Object
49 50 51 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 49 def (query:, type:, object:) query.trace("authorized", { context: query.context, type: type, object: object, path: query.context[:current_path] }) { super } end |
#authorized_lazy(query:, type:, object:) ⇒ Object
53 54 55 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 53 def (query:, type:, object:) query.trace("authorized_lazy", { context: query.context, type: type, object: object, path: query.context[:current_path] }) { super } end |
#execute_field(field:, query:, ast_node:, arguments:, object:) ⇒ Object
41 42 43 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 41 def execute_field(field:, query:, ast_node:, arguments:, object:) query.trace("execute_field", { field: field, query: query, ast_node: ast_node, arguments: arguments, object: object, owner: field.owner, path: query.context[:current_path] }) { super } end |
#execute_field_lazy(field:, query:, ast_node:, arguments:, object:) ⇒ Object
45 46 47 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 45 def execute_field_lazy(field:, query:, ast_node:, arguments:, object:) query.trace("execute_field_lazy", { field: field, query: query, ast_node: ast_node, arguments: arguments, object: object, owner: field.owner, path: query.context[:current_path] }) { super } end |
#execute_multiplex(multiplex:) ⇒ Object
29 30 31 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 29 def execute_multiplex(multiplex:) multiplex.trace("execute_multiplex", { multiplex: multiplex }) { super } end |
#execute_query(query:) ⇒ Object
33 34 35 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 33 def execute_query(query:) query.trace("execute_query", { query: query }) { super } end |
#execute_query_lazy(query:, multiplex:) ⇒ Object
37 38 39 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 37 def execute_query_lazy(query:, multiplex:) multiplex.trace("execute_query_lazy", { multiplex: multiplex, query: query }) { super } end |
#lex(query_string:) ⇒ Object
9 10 11 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 9 def lex(query_string:) (@multiplex || @query).trace("lex", { query_string: query_string }) { super } end |
#parse(query_string:) ⇒ Object
13 14 15 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 13 def parse(query_string:) (@multiplex || @query).trace("parse", { query_string: query_string }) { super } end |
#resolve_type(query:, type:, object:) ⇒ Object
57 58 59 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 57 def resolve_type(query:, type:, object:) query.trace("resolve_type", { context: query.context, type: type, object: object, path: query.context[:current_path] }) { super } end |
#resolve_type_lazy(query:, type:, object:) ⇒ Object
61 62 63 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 61 def resolve_type_lazy(query:, type:, object:) query.trace("resolve_type_lazy", { context: query.context, type: type, object: object, path: query.context[:current_path] }) { super } end |
#validate(query:, validate:) ⇒ Object
17 18 19 |
# File 'lib/graphql/tracing/call_legacy_tracers.rb', line 17 def validate(query:, validate:) query.trace("validate", { validate: validate, query: query }) { super } end |