File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,12 @@ def analyze_query(query:, &block)
99
99
def execute_query ( query :, &block )
100
100
attributes = { }
101
101
attributes [ 'graphql.operation.name' ] = query . selected_operation_name if query . selected_operation_name
102
- attributes [ 'graphql.operation.type' ] = query . selected_operation . operation_type
103
- attributes [ 'graphql.document' ] = query . query_string
102
+ if query . is_a? ( ::GraphQL ::Query ::Partial )
103
+ attributes [ 'graphql.partial.path' ] = query . path . to_s
104
+ else
105
+ attributes [ 'graphql.operation.type' ] = query . selected_operation . operation_type
106
+ attributes [ 'graphql.document' ] = query . query_string
107
+ end
104
108
105
109
tracer . in_span ( 'graphql.execute_query' , attributes : attributes ) do
106
110
super
You can’t perform that action at this time.
0 commit comments