@@ -39,7 +39,7 @@ By default, GraphQL-Ruby makes a new trace instance when it runs a query. You ca
3939You can attach a trace module to run only in some circumstances by using ` mode: ` . For example, to add detailed tracing for only some requests:
4040
4141``` ruby
42- trace_with DetailedTracing , mode: :detailed_metrics
42+ trace_with DetailedTrace , mode: :detailed_metrics
4343```
4444
4545Then, to opt into that trace, use ` context: { trace_mode: :detailed_metrics, ... } ` when executing queries.
@@ -75,7 +75,7 @@ tracing as follows:
7575require ' appoptics_apm'
7676
7777class MySchema < GraphQL ::Schema
78- use( GraphQL ::Tracing ::AppOpticsTracing )
78+ trace_with GraphQL ::Tracing ::AppOpticsTrace
7979end
8080```
8181<div class =" monitoring-img-group " >
@@ -88,7 +88,7 @@ To add [AppSignal](https://appsignal.com/) instrumentation:
8888
8989``` ruby
9090class MySchema < GraphQL ::Schema
91- use( GraphQL ::Tracing ::AppsignalTracing )
91+ trace_with GraphQL ::Tracing ::AppsignalTrace
9292end
9393```
9494
@@ -102,9 +102,9 @@ To add [New Relic](https://newrelic.com/) instrumentation:
102102
103103``` ruby
104104class MySchema < GraphQL ::Schema
105- use( GraphQL ::Tracing ::NewRelicTracing )
105+ trace_with GraphQL ::Tracing ::NewRelicTrace
106106 # Optional, use the operation name to set the new relic transaction name:
107- # use( GraphQL::Tracing::NewRelicTracing , set_transaction_name: true)
107+ # trace_with GraphQL::Tracing::NewRelicTrace , set_transaction_name: true
108108end
109109```
110110
@@ -119,7 +119,7 @@ To add [Scout APM](https://scoutapp.com/) instrumentation:
119119
120120``` ruby
121121class MySchema < GraphQL ::Schema
122- use( GraphQL ::Tracing ::ScoutTracing )
122+ trace_with GraphQL ::Tracing ::ScoutTrace
123123end
124124```
125125
@@ -148,7 +148,7 @@ To add [Datadog](https://www.datadoghq.com) instrumentation:
148148
149149``` ruby
150150class MySchema < GraphQL ::Schema
151- use( GraphQL ::Tracing ::DataDogTracing , options)
151+ trace_with GraphQL ::Tracing ::DataDogTrace , options
152152end
153153```
154154
@@ -169,7 +169,7 @@ To add [Prometheus](https://prometheus.io) instrumentation:
169169require ' prometheus_exporter/client'
170170
171171class MySchema < GraphQL ::Schema
172- use( GraphQL ::Tracing ::PrometheusTracing )
172+ trace_with GraphQL ::Tracing ::PrometheusTrace
173173end
174174```
175175
@@ -181,7 +181,7 @@ The PrometheusExporter server must be run with a custom type collector that exte
181181if defined? (PrometheusExporter ::Server )
182182 require ' graphql/tracing'
183183
184- class GraphQLCollector < GraphQL ::Tracing ::PrometheusTracing ::GraphQLCollector
184+ class GraphQLCollector < GraphQL ::Tracing ::PrometheusTrace ::GraphQLCollector
185185 end
186186end
187187```
@@ -196,7 +196,7 @@ To add [Sentry](https://sentry.io) instrumentation:
196196
197197``` ruby
198198class MySchema < GraphQL ::Schema
199- use( GraphQL ::Tracing ::SentryTracing )
199+ trace_with GraphQL ::Tracing ::SentryTrace
200200end
201201```
202202
@@ -207,14 +207,14 @@ end
207207
208208## Statsd
209209
210- You can add Statsd instrumentation by initializing a statsd client and passing it to {{ "GraphQL::Tracing::StatsdTracing " | api_doc }}:
210+ You can add Statsd instrumentation by initializing a statsd client and passing it to {{ "GraphQL::Tracing::StatsdTrace " | api_doc }}:
211211
212212``` ruby
213213$statsd = Statsd .new ' localhost' , 9125
214214# ...
215215
216216class MySchema < GraphQL ::Schema
217- use GraphQL ::Tracing ::StatsdTracing , statsd: $statsd
217+ use GraphQL ::Tracing ::StatsdTrace , statsd: $statsd
218218end
219219```
220220
0 commit comments