Skip to content

Commit c8df6bc

Browse files
committed
Deprecate tracer option
1 parent 1f7c6ab commit c8df6bc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

guides/queries/tracing.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,10 @@ To add [Datadog](https://www.datadoghq.com) instrumentation:
148148

149149
```ruby
150150
class MySchema < GraphQL::Schema
151-
use(GraphQL::Tracing::DataDogTracing, options)
151+
use(GraphQL::Tracing::DataDogTracing)
152152
end
153153
```
154154

155-
You may provide `options` as a `Hash` with the following values:
156-
157-
| Key | Description | Default |
158-
| --- | ----------- | ------- |
159-
| `tracer` | Tracer used to perform instrumentation. Usually you don't need to set this. | `Datadog::Tracing` |
160-
161155
For more details about Datadog's tracing API, check out the [Ruby documentation](https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md) or the [APM documentation](https://docs.datadoghq.com/tracing/) for more product information.
162156

163157
## Prometheus

lib/graphql/tracing/data_dog_trace.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module GraphQL
44
module Tracing
55
module DataDogTrace
6+
# @param tracer [#trace] Deprecated
67
# @param analytics_enabled [Boolean] Deprecated
78
# @param analytics_sample_rate [Float] Deprecated
89
def initialize(tracer: nil, analytics_enabled: false, analytics_sample_rate: 1.0, service: nil, **rest)

lib/graphql/tracing/data_dog_tracing.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def prepare_span(key, data, span)
5656
def tracer
5757
default_tracer = defined?(Datadog::Tracing) ? Datadog::Tracing : Datadog.tracer
5858

59+
# [Deprecated] options[:tracer] will be removed in the future
5960
options.fetch(:tracer, default_tracer)
6061
end
6162

0 commit comments

Comments
 (0)