Configuration
This plugin is compatible with DB-less mode.
Compatible protocols
The Datadog plugin is compatible with the following protocols:
grpc
, grpcs
, http
, https
, tcp
, tls
, tls_passthrough
, udp
, ws
, wss
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
name
string requiredThe name of the plugin, in this case
datadog
. -
instance_name
stringAn optional custom name to identify an instance of the plugin, for example
datadog_my-service
. Useful when running the same plugin in multiple contexts, for example, on multiple services. -
service.name or service.id
stringThe name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/SERVICE_NAME|ID/plugins
. -
route.name or route.id
stringThe name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/ROUTE_NAME|ID/plugins
. -
consumer.name or consumer.id
stringThe name or ID of the consumer the plugin targets. Set one of these parameters if adding the plugin to a consumer through the top-level
/plugins
endpoint. Not required if using/consumers/CONSUMER_NAME|ID/plugins
. -
enabled
boolean default:true
Whether this plugin will be applied.
-
config
record required-
host
string referenceable default:localhost
A string representing a host name, such as example.com.
-
port
integer default:8125
between:0
65535
An integer representing a port number between 0 and 65535, inclusive.
-
prefix
string default:kong
String to be attached as a prefix to a metric’s name.
-
service_name_tag
string default:name
String to be attached as the name of the service.
-
status_tag
string default:status
String to be attached as the tag of the HTTP status.
-
consumer_tag
string default:consumer
String to be attached as tag of the consumer.
-
retry_count
integerNumber of times to retry when sending data to the upstream server.
-
queue_size
integerMaximum number of log entries to be sent on each message to the upstream server.
-
flush_timeout
numberOptional time in seconds. If
queue_size
> 1, this is the max idle time before sending a log with less thanqueue_size
records.
-
queue
record required-
max_batch_size
integer default:1
between:1
1000000
Maximum number of entries that can be processed at a time.
-
max_coalescing_delay
number default:1
between:0
3600
Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.
-
max_entries
integer default:10000
between:1
1000000
Maximum number of entries that can be waiting on the queue.
-
max_bytes
integerMaximum number of bytes that can be waiting on a queue, requires string content.
-
max_retry_time
number default:60
Time in seconds before the queue gives up calling a failed handler for a batch.
-
initial_retry_delay
number default:0.01
between:0.001
1000000
Time in seconds before the initial retry is made for a failing batch.
-
max_retry_delay
number default:60
between:0.001
1000000
Maximum time in seconds between retries, caps exponential backoff.
-
-
metrics
array of typerecord
required default:{"sample_rate"=>1, "stat_type"=>"counter", "name"=>"request_count", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"]}, {"name"=>"latency", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"], "stat_type"=>"timer"}, {"name"=>"request_size", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"], "stat_type"=>"timer"}, {"name"=>"response_size", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"], "stat_type"=>"timer"}, {"name"=>"upstream_latency", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"], "stat_type"=>"timer"}, {"name"=>"kong_latency", "consumer_identifier"=>"custom_id", "tags"=>["app:kong"], "stat_type"=>"timer"}
List of metrics to be logged.
-
name
string required Must be one of:kong_latency
,latency
,request_count
,request_size
,response_size
,upstream_latency
Datadog metric’s name
-
stat_type
string required Must be one of:counter
,gauge
,histogram
,meter
,set
,timer
,distribution
Determines what sort of event the metric represents
-
tags
array of typestring
List of tags
-
sample_rate
number between:0
1
Sampling rate
-
consumer_identifier
string Must be one of:consumer_id
,custom_id
,username
Authenticated user detail
-
-