Kong · Schema
StatsdPluginConfig
API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| config | object | |
| consumer | object | If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to acti |
| name | object | |
| protocols | array | A set of strings representing protocols. |
| route | object | If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used. |
| service | object | If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/StatsdPluginConfig",
"title": "StatsdPluginConfig",
"x-speakeasy-entity": "PluginStatsd",
"properties": {
"config": {
"type": "object",
"properties": {
"allow_status_codes": {
"description": "List of status code ranges that are allowed to be logged in metrics.",
"type": "array",
"items": {
"type": "string"
}
},
"consumer_identifier_default": {
"type": "string",
"default": "custom_id",
"enum": [
"consumer_id",
"custom_id",
"username"
]
},
"flush_timeout": {
"type": "number"
},
"host": {
"description": "The IP address or hostname of StatsD server to send data to.",
"type": "string",
"default": "localhost"
},
"hostname_in_prefix": {
"type": "boolean",
"default": false
},
"metrics": {
"description": "List of metrics to be logged.",
"type": "array",
"items": {
"properties": {
"consumer_identifier": {
"description": "Authenticated user detail.",
"type": "string",
"enum": [
"consumer_id",
"custom_id",
"username"
]
},
"name": {
"description": "StatsD metric\u2019s name.",
"type": "string",
"enum": [
"cache_datastore_hits_total",
"cache_datastore_misses_total",
"kong_latency",
"latency",
"request_count",
"request_per_user",
"request_size",
"response_size",
"shdict_usage",
"status_count",
"status_count_per_user",
"status_count_per_user_per_route",
"status_count_per_workspace",
"unique_users",
"upstream_latency"
]
},
"sample_rate": {
"description": "Sampling rate",
"type": "number"
},
"service_identifier": {
"description": "Service detail.",
"type": "string",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
]
},
"stat_type": {
"description": "Determines what sort of event a metric represents.",
"type": "string",
"enum": [
"counter",
"gauge",
"histogram",
"meter",
"set",
"timer"
]
},
"workspace_identifier": {
"description": "Workspace detail.",
"type": "string",
"enum": [
"workspace_id",
"workspace_name"
]
}
},
"required": [
"name",
"stat_type"
],
"type": "object"
}
},
"port": {
"description": "The port of StatsD server to send data to.",
"type": "integer",
"default": 8125,
"maximum": 65535,
"minimum": 0
},
"prefix": {
"description": "String to prefix to each metric's name.",
"type": "string",
"default": "kong"
},
"queue": {
"type": "object",
"properties": {
"concurrency_limit": {
"description": "The number of of queue delivery timers. -1 indicates unlimited.",
"type": "integer",
"default": 1,
"enum": [
-1,
1
]
},
"initial_retry_delay": {
"description": "Time in seconds before the initial retry is made for a failing batch.",
"type": "number",
"default": 0.01,
"maximum": 1000000,
"minimum": 0.001
},
"max_batch_size": {
"description": "Maximum number of entries that can be processed at a time.",
"type": "integer",
"default": 1,
"maximum": 1000000,
"minimum": 1
},
"max_bytes": {
"description": "Maximum number of bytes that can be waiting on a queue, requires string content.",
"type": "integer"
},
"max_coalescing_delay": {
"description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.",
"type": "number",
"default": 1,
"maximum": 3600,
"minimum": 0
},
"max_entries": {
"description": "Maximum number of entries that can be waiting on the queue.",
"type": "integer",
"default": 10000,
"maximum": 1000000,
"minimum": 1
},
"max_retry_delay": {
"description": "Maximum time in seconds between retries, caps exponential backoff.",
"type": "number",
"default": 60,
"maximum": 1000000,
"minimum": 0.001
},
"max_retry_time": {
"description": "Time in seconds before the queue gives up calling a failed handler for a batch.",
"type": "number",
"default": 60
}
}
},
"queue_size": {
"type": "integer"
},
"retry_count": {
"type": "integer"
},
"service_identifier_default": {
"type": "string",
"default": "service_name_or_host",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
]
},
"tag_style": {
"type": "string",
"enum": [
"dogstatsd",
"influxdb",
"librato",
"signalfx"
]
},
"udp_packet_size": {
"type": "number",
"default": 0,
"maximum": 65507,
"minimum": 0
},
"use_tcp": {
"type": "boolean",
"default": false
},
"workspace_identifier_default": {
"type": "string",
"default": "workspace_id",
"enum": [
"workspace_id",
"workspace_name"
]
}
}
},
"consumer": {
"description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
},
"name": {
"const": "statsd"
},
"protocols": {
"description": "A set of strings representing protocols.",
"type": "array",
"items": {
"description": "A string representing a protocol, such as HTTP or HTTPS.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"tcp",
"tls",
"tls_passthrough",
"udp",
"ws",
"wss"
],
"type": "string"
},
"format": "set",
"default": [
"grpc",
"grpcs",
"http",
"https"
]
},
"route": {
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
},
"service": {
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
}
}
}