Kong · Schema
StatsdAdvancedPluginConfig
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/StatsdAdvancedPluginConfig",
"title": "StatsdAdvancedPluginConfig",
"x-speakeasy-entity": "PluginStatsdAdvanced",
"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": {
"description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.",
"type": "string",
"default": "custom_id",
"enum": [
"consumer_id",
"custom_id",
"username"
]
},
"host": {
"description": "A string representing a host name, such as example.com.",
"type": "string",
"default": "localhost"
},
"hostname_in_prefix": {
"description": "Include the `hostname` in the `prefix` for each metric name.",
"type": "boolean",
"default": false
},
"metrics": {
"description": "List of Metrics to be logged.",
"type": "array",
"items": {
"properties": {
"consumer_identifier": {
"type": "string",
"enum": [
"consumer_id",
"custom_id",
"username"
]
},
"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": {
"type": "number"
},
"service_identifier": {
"type": "string",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
]
},
"stat_type": {
"type": "string",
"enum": [
"counter",
"gauge",
"histogram",
"meter",
"set",
"timer"
]
},
"workspace_identifier": {
"type": "string",
"enum": [
"workspace_id",
"workspace_name"
]
}
},
"required": [
"name",
"stat_type"
],
"type": "object"
}
},
"port": {
"description": "An integer representing a port number between 0 and 65535, inclusive.",
"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
}
}
},
"service_identifier_default": {
"description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.",
"type": "string",
"default": "service_name_or_host",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
]
},
"udp_packet_size": {
"description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).",
"type": "number",
"default": 0,
"maximum": 65507,
"minimum": 0
},
"use_tcp": {
"description": "Use TCP instead of UDP.",
"type": "boolean",
"default": false
},
"workspace_identifier_default": {
"description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ",
"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-advanced"
},
"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"
}
}
}
}
}