Class: GraphQL::Tracing::LegacyTrace
- Inherits:
-
Trace
- Object
- Trace
- GraphQL::Tracing::LegacyTrace
show all
- Defined in:
- lib/graphql/tracing/legacy_trace.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
Methods inherited from Trace
#initialize
Instance Method Details
#analyze_multiplex(multiplex:) ⇒ Object
20
21
22
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 20
def analyze_multiplex(multiplex:)
multiplex.trace("analyze_multiplex", { multiplex: multiplex }) { super }
end
|
#analyze_query(query:) ⇒ Object
24
25
26
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 24
def analyze_query(query:)
query.trace("analyze_query", { query: query }) { super }
end
|
#authorized(query:, type:, object:) ⇒ Object
48
49
50
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 48
def authorized(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
52
53
54
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 52
def authorized_lazy(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
40
41
42
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 40
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
44
45
46
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 44
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
28
29
30
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 28
def execute_multiplex(multiplex:)
multiplex.trace("execute_multiplex", { multiplex: multiplex }) { super }
end
|
#execute_query(query:) ⇒ Object
32
33
34
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 32
def execute_query(query:)
query.trace("execute_query", { query: query }) { super }
end
|
#execute_query_lazy(query:, multiplex:) ⇒ Object
36
37
38
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 36
def execute_query_lazy(query:, multiplex:)
multiplex.trace("execute_query_lazy", { multiplex: multiplex, query: query }) { super }
end
|
#lex(query_string:) ⇒ Object
8
9
10
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 8
def lex(query_string:)
(@multiplex || @query).trace("lex", { query_string: query_string }) { super }
end
|
#parse(query_string:) ⇒ Object
12
13
14
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 12
def parse(query_string:)
(@multiplex || @query).trace("parse", { query_string: query_string }) { super }
end
|
#resolve_type(query:, type:, object:) ⇒ Object
56
57
58
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 56
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
60
61
62
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 60
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
16
17
18
|
# File 'lib/graphql/tracing/legacy_trace.rb', line 16
def validate(query:, validate:)
query.trace("validate", { validate: validate, query: query }) { super }
end
|