Skip to content

Commit

Permalink
Merge pull request #4779 from rmosolgo/deprecate-legacy-tracing
Browse files Browse the repository at this point in the history
Deprecate Tracing::PlatformTracing
  • Loading branch information
rmosolgo authored Jan 15, 2024
2 parents fd0a984 + 62a6c8c commit 4f0fd66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/graphql/tracing/platform_tracing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ def self.use(schema_defn, options = {})
trace_name = tracing_name.sub("Tracing", "Trace")
if GraphQL::Tracing.const_defined?(trace_name, false)
trace_module = GraphQL::Tracing.const_get(trace_name)
warn("`use(#{self.name})` is deprecated, use the equivalent `trace_with(#{trace_module.name})` instead. More info: https://graphql-ruby.org/queries/tracing.html")
schema_defn.trace_with(trace_module, **options)
else
warn("`use(#{self.name})` and `Tracing::PlatformTracing` are deprecated. Use a `trace_with(...)` module instead. More info: https://graphql-ruby.org/queries/tracing.html. Please open an issue on the GraphQL-Ruby repo if you want to discuss further!")
tracer = self.new(**options)
schema_defn.tracer(tracer)
end
Expand Down

0 comments on commit 4f0fd66

Please sign in to comment.