Skip to content

Commit da513ac

Browse files
committed
Add statsd docs
1 parent 252b30a commit da513ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

guides/queries/tracing.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,18 @@ end
191191
```sh
192192
bundle exec prometheus_exporter -a lib/graphql_collector.rb
193193
```
194+
195+
## Statsd
196+
197+
You can add Statsd instrumentation by initializing a statsd client and passing it to {{ "GraphQL::Tracing::StatsdTracing" | api_doc }}:
198+
199+
```ruby
200+
$statsd = Statsd.new 'localhost', 9125
201+
# ...
202+
203+
class MySchema < GraphQL::Schema
204+
use GraphQL::Tracing::StatsdTracing, statsd: $statsd
205+
end
206+
```
207+
208+
Any Statsd client that implements `.time(name) { ... }` will work.

0 commit comments

Comments
 (0)