Kong · Schema

DatadogPluginConfig

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.
View JSON Schema on GitHub

JSON Schema

kong-datadogpluginconfig-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/DatadogPluginConfig",
  "title": "DatadogPluginConfig",
  "x-speakeasy-entity": "PluginDatadog",
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "consumer_tag": {
          "description": "String to be attached as tag of the consumer.",
          "type": "string",
          "default": "consumer"
        },
        "flush_timeout": {
          "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.",
          "type": "number"
        },
        "host": {
          "description": "A string representing a host name, such as example.com.",
          "type": "string",
          "default": "localhost",
          "x-referenceable": true
        },
        "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": "Datadog metric\u2019s name",
                "type": "string",
                "enum": [
                  "kong_latency",
                  "latency",
                  "request_count",
                  "request_size",
                  "response_size",
                  "upstream_latency"
                ]
              },
              "sample_rate": {
                "description": "Sampling rate",
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              "stat_type": {
                "description": "Determines what sort of event the metric represents",
                "type": "string",
                "enum": [
                  "counter",
                  "distribution",
                  "gauge",
                  "histogram",
                  "meter",
                  "set",
                  "timer"
                ]
              },
              "tags": {
                "description": "List of tags",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "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 be attached as a prefix to a 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": {
          "description": "Maximum number of log entries to be sent on each message to the upstream server.",
          "type": "integer"
        },
        "retry_count": {
          "description": "Number of times to retry when sending data to the upstream server.",
          "type": "integer"
        },
        "route_name_tag": {
          "description": "String to be attached as tag of the route name or ID.",
          "type": "string"
        },
        "service_name_tag": {
          "description": "String to be attached as the name of the service.",
          "type": "string",
          "default": "name"
        },
        "status_tag": {
          "description": "String to be attached as the tag of the HTTP status.",
          "type": "string",
          "default": "status"
        }
      }
    },
    "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": "datadog"
    },
    "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"
        }
      }
    }
  }
}