@@ -60,15 +60,15 @@ def initialize(trace_scalars: false, **_options)
60
60
end
61
61
62
62
def execute_multiplex ( multiplex :, &block )
63
- tracer . in_span ( 'graphql.execute_multiplex' , & block )
63
+ tracer . in_span ( 'graphql.execute_multiplex' ) { super }
64
64
end
65
65
66
66
def lex ( query_string :, &block )
67
- tracer . in_span ( 'graphql.lex' , & block )
67
+ tracer . in_span ( 'graphql.lex' ) { super }
68
68
end
69
69
70
70
def parse ( query_string :, &block )
71
- tracer . in_span ( 'graphql.parse' , & block )
71
+ tracer . in_span ( 'graphql.parse' ) { super }
72
72
end
73
73
74
74
def validate ( query :, validate :, &block )
@@ -89,11 +89,11 @@ def validate(query:, validate:, &block)
89
89
end
90
90
91
91
def analyze_multiplex ( multiplex :, &block )
92
- tracer . in_span ( 'graphql.analyze_multiplex' , & block )
92
+ tracer . in_span ( 'graphql.analyze_multiplex' ) { super }
93
93
end
94
94
95
95
def analyze_query ( query :, &block )
96
- tracer . in_span ( 'graphql.analyze_query' , & block )
96
+ tracer . in_span ( 'graphql.analyze_query' ) { super }
97
97
end
98
98
99
99
def execute_query ( query :, &block )
@@ -102,11 +102,13 @@ def execute_query(query:, &block)
102
102
attributes [ 'graphql.operation.type' ] = query . selected_operation . operation_type
103
103
attributes [ 'graphql.document' ] = query . query_string
104
104
105
- tracer . in_span ( 'graphql.execute_query' , attributes : attributes , &block )
105
+ tracer . in_span ( 'graphql.execute_query' , attributes : attributes ) do
106
+ super
107
+ end
106
108
end
107
109
108
110
def execute_query_lazy ( query :, multiplex :, &block )
109
- tracer . in_span ( 'graphql.execute_query_lazy' , & block )
111
+ tracer . in_span ( 'graphql.execute_query_lazy' ) { super }
110
112
end
111
113
112
114
def execute_field ( field :, query :, ast_node :, arguments :, object :, &block )
@@ -133,27 +135,27 @@ def authorized(query:, type:, object:, &block)
133
135
134
136
attributes = @_otel_type_attrs_cache [ type ]
135
137
136
- tracer . in_span ( platform_key , attributes : attributes , & block )
138
+ tracer . in_span ( platform_key , attributes : attributes ) { super }
137
139
end
138
140
139
141
def authorized_lazy ( query :, type :, object :, &block )
140
142
platform_key = @_otel_authorized_key_cache [ type ]
141
143
return super unless platform_key
142
144
143
145
attributes = @_otel_lazy_type_attrs_cache [ type ]
144
- tracer . in_span ( platform_key , attributes : attributes , & block )
146
+ tracer . in_span ( platform_key , attributes : attributes ) { super }
145
147
end
146
148
147
149
def resolve_type ( query :, type :, object :, &block )
148
150
platform_key = @_otel_resolve_type_key_cache [ type ]
149
151
attributes = @_otel_type_attrs_cache [ type ]
150
- tracer . in_span ( platform_key , attributes : attributes , & block )
152
+ tracer . in_span ( platform_key , attributes : attributes ) { super }
151
153
end
152
154
153
155
def resolve_type_lazy ( query :, type :, object :, &block )
154
156
platform_key = @_otel_resolve_type_key_cache [ type ]
155
157
attributes = @_otel_lazy_type_attrs_cache [ type ]
156
- tracer . in_span ( platform_key , attributes : attributes , & block )
158
+ tracer . in_span ( platform_key , attributes : attributes ) { super }
157
159
end
158
160
159
161
private
0 commit comments