Skip to content

Commit

Permalink
Freeze default case
Browse files Browse the repository at this point in the history
  • Loading branch information
elenatanasoiu committed Feb 16, 2024
1 parent 937ea1c commit 107bb1b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module Tracers
# GraphQLTracer contains the OpenTelemetry tracer implementation compatible with
# the GraphQL tracer API
class GraphQLTracer < ::GraphQL::Tracing::PlatformTracing
DEFAULT_HASH = {}.freeze

self.platform_keys = {
'lex' => 'graphql.lex',
'parse' => 'graphql.parse',
Expand Down Expand Up @@ -130,7 +132,7 @@ def attributes_for(key, data)
attrs['graphql.operation.name'] = data[:query].selected_operation_name || 'anonymous'
attrs.freeze
else
{}
DEFAULT_HASH
end
end

Expand Down

0 comments on commit 107bb1b

Please sign in to comment.