DataDog, InfluxDB, Telegraf, StatsD
You can use @graphql-mesh/plugin-statsd
plugin to collect and send metrics to Datadog's DogStatsD
and InfluxDB's Telegraf StatsD services.
Compatible with:
- Datadog's DogStatsD server
- InfluxDB's Telegraf StatsD server
- Etsy's StatsD serve
Available metrics:
graphql.operations.count
- the number of performed operations (including failures)graphql.operations.error.count
- the number of failed operationsgraphql.operations.latency
- a histogram of response times (in milliseconds)graphql.delegations.count
- the number of delegated operations to the sourcesgraphql.delegations.error.count
- the number of failed delegated operationsgraphql.delegations.latency
- a histogram of delegated response times (in milliseconds)graphql.fetch.count
- the number of outgoing HTTP requestsgraphql.fetch.error.count
- the number of failed outgoing HTTP requestsgraphql.fetch.latency
- a histogram of outgoing HTTP response times (in milliseconds)
You can also customize the
graphql
prefix and add custom tags to the metrics.
Getting Started
npm i @graphql-mesh/plugin-statsd hot-shots
Example Configuration
.meshrc.yaml
# ...
plugins:
- statsd:
# Configure `hot-shots`
client:
port: 8020
# results in `gql.operations.count` instead of `graphql.operations.count`
prefix: my-graphql-mesh
# If you wish to disable introspection logging
skipIntrospection: true
Config API Reference
skipIntrospection
(type:Boolean
) - If you wish to disable introspection for logging (default: false)prefix
(type:String
) - prefix.operations.count (default: graphql)client
(type:Object
) - Client Configuration:bufferFlushInterval
(type:Int
)bufferHolder
(type:Object
):buffer
(type:String
, required)
cacheDns
(type:Boolean
)cacheDnsTtl
(type:Int
)globalTags
(type:JSON
)globalize
(type:Boolean
)host
(type:String
)isChild
(type:Boolean
)maxBufferSize
(type:Int
)mock
(type:Boolean
)path
(type:String
)port
(type:Int
)protocol
(type:String (tcp | udp | uds | stream)
)sampleRate
(type:Float
)suffix
(type:String
)telegraf
(type:Boolean
)useDefaultRoute
(type:Boolean
)tagPrefix
(type:String
)tagSeperator
(type:String
)tcpGracefulErrorHandling
(type:Boolean
)tcpGracefulRestartRateLimit
(type:Int
)udsGracefulErrorHandling
(type:Boolean
)udsGracefulRestartRateLimit
(type:Int
)closingFlushInterval
(type:Int
)