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)
9999 def execute_query ( query :, &block )
100100 attributes = { }
101101 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
104108
105109 tracer . in_span ( 'graphql.execute_query' , attributes : attributes ) do
106110 super
You can’t perform that action at this time.
0 commit comments