Skip to content

Commit 8953ec3

Browse files
author
OuYangJinTing
committed
Fix prometheus tracing guide
1 parent 2c92f83 commit 8953ec3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

guides/queries/tracing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ The PrometheusExporter server must be run with a custom type collector that exte
181181

182182
```ruby
183183
# lib/graphql_collector.rb
184+
if defined?(PrometheusExporter::Server)
185+
require 'graphql/tracing'
184186

185-
require 'graphql/tracing'
186-
187-
class GraphQLCollector < GraphQL::Tracing::PrometheusTracing::GraphQLCollector
187+
class GraphQLCollector < GraphQL::Tracing::PrometheusTracing::GraphQLCollector
188+
end
188189
end
189190
```
190191

0 commit comments

Comments
 (0)