From b391e8eb0dd39328f2634ad1a31eda39f21c0eeb Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Wed, 10 Apr 2024 12:56:41 -0400 Subject: [PATCH] fix: analyze span names in GraphQL instrumentation (#930) --- .../instrumentation/graphql/tracers/graphql_trace.rb | 4 ++-- .../instrumentation/graphql/tracers/graphql_trace_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb index 84ebae562..70c966623 100644 --- a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb +++ b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb @@ -89,11 +89,11 @@ def validate(query:, validate:, &block) end def analyze_multiplex(multiplex:, &block) - tracer.in_span('graphql.analyze_query', &block) + tracer.in_span('graphql.analyze_multiplex', &block) end def analyze_query(query:, &block) - tracer.in_span('graphql.analyze_multiplex', &block) + tracer.in_span('graphql.analyze_query', &block) end def execute_query(query:, &block) diff --git a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb index 4ae7fb15e..22e194036 100644 --- a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb +++ b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb @@ -47,8 +47,8 @@ 'graphql.lex', 'graphql.parse', 'graphql.validate', - 'graphql.analyze_multiplex', 'graphql.analyze_query', + 'graphql.analyze_multiplex', 'graphql.execute_query', 'graphql.execute_query_lazy', 'graphql.execute_multiplex'