Skip to main content
Version: 1.1-beta

Kafka Logs

Collect log information from request gateways and output it to Kafka to facilitate further operations, such as log analysis.

Featuresโ€‹

The ability to output log contents generated during program execution to a specified Kafka cluster queue.

Operation Demonstrationโ€‹

Create a New Kafka Log Configurationโ€‹

  1. Click on Operations and Integration -> Log Configuration -> Kafka Logs in the left navigation bar, then click on Add Kafka Log.

  1. Fill in the Kafka log configuration.

Configuration Explanation:

Field NameDescription
VersionKafka version
Server AddressAddresses of Kafka services, multiple addresses are separated by commas
TopicTopic information for Kafka service
Partition TypeMethod for selecting partitions, default is hash; if partition_key is empty when hash is selected, it defaults to random selection
PartitionSpecifies the partition number when Partition Type is set to manual
Partition KeySpecifies the hash value when Partition Type is set to hash
Request TimeoutTimeout period in seconds
Output FormatFormat for log content output, supporting single-line and JSON format output
Formatting ConfigurationOutput format template, configuration tutorial can be found here

Sample Formatting Configuration

{
"fields": [
"$time_iso8601",
"$request_id",
"@request",
"@proxy",
"@response",
"@status_code",
"@time"
],
"request": [
"$request_method",
"$scheme",
"$request_uri",
"$host",
"$header",
"$remote_addr"
],
"proxy": [
"$proxy_method",
"$proxy_scheme",
"$proxy_uri",
"$proxy_host",
"$proxy_header",
"$proxy_addr"
],
"response": [
"$response_header"
],
"status_code": [
"$status",
"$proxy_status"
],
"time": [
"$request_time",
"$response_time"
]
}

Go Liveโ€‹

  1. Click the Go Live button next to the configuration that is ready to be deployed.