module GraphQL::Tracing::ActiveSupportNotificationsTracing
This implementation forwards events to ActiveSupport::Notifications with a `graphql.` prefix.
Constants
- KEYS
A cache of frequently-used keys to avoid needless string allocations
Public Class Methods
trace(key, metadata) { || ... }
click to toggle source
# File lib/graphql/tracing/active_support_notifications_tracing.rb, line 22 def self.trace(key, metadata) prefixed_key = KEYS[key] || "graphql.#{key}" ActiveSupport::Notifications.instrument(prefixed_key, metadata) do yield end end