Skip to content

Commit 4f0fd66

Browse files
authored
Merge pull request #4779 from rmosolgo/deprecate-legacy-tracing
Deprecate Tracing::PlatformTracing
2 parents fd0a984 + 62a6c8c commit 4f0fd66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/graphql/tracing/platform_tracing.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ def self.use(schema_defn, options = {})
8181
trace_name = tracing_name.sub("Tracing", "Trace")
8282
if GraphQL::Tracing.const_defined?(trace_name, false)
8383
trace_module = GraphQL::Tracing.const_get(trace_name)
84+
warn("`use(#{self.name})` is deprecated, use the equivalent `trace_with(#{trace_module.name})` instead. More info: https://graphql-ruby.org/queries/tracing.html")
8485
schema_defn.trace_with(trace_module, **options)
8586
else
87+
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!")
8688
tracer = self.new(**options)
8789
schema_defn.tracer(tracer)
8890
end

0 commit comments

Comments
 (0)