DataDog, InfluxDB, Telegraf, StatsD
💡
This page is currently under construction and expected to change. Please feel free to reach out to us directly in case you are having any troubles.
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
mesh.config.ts
import { StatsD } from 'hot-shots'
import useStatsD from '@graphql-mesh/plugin-statsd'
import { defineConfig } from '@graphql-mesh/serve-cli'
export const serveConfig = defineConfig({
plugins: pluginCtx => [
useStatsD({
...pluginCtx,
// Configure `hot-shots` if only you need. You don't need to pass this if you don't need to configure it.
client: new StatsD({
port: 8020
}),
// results in `my-graphql-mesh.operations.count` instead of `graphql.operations.count`
prefix: 'my-graphql-mesh',
// If you wish to disable introspection logging
skipIntrospection: true
})
]
})