Updated on 2025-08-15 GMT+08:00

KafkaLogContent

Table 1 KafkaLogContent

Parameter

Mandatory

Type

Description

broker_list

Yes

Array of strings

Broker addresses of the target Kafka.

topic

Yes

String

Topic of the logs reported by the target Kafka.

key

No

String

Key allocated to the message partition.

max_retry_count

No

Integer

Number of attempts to resend a message after it fails to be sent. Default value: 0. Range: 0–5.

retry_backoff

No

Integer

Interval between resending attempts, in seconds. Value range: 1–10.

sasl_config

No

PluginKafkaLogSaslConfig object

SASL configuration of the Kafka log push plug-in.

meta_config

No

PluginKafkaLogMetaConfig object

Metadata configuration of the Kafka log push plug-in.

Table 2 PluginKafkaLogSaslConfig

Parameter

Mandatory

Type

Description

security_protocol

No

String

Security protocol. Default value: PLAINTEXT. Options:

  • PLAINTEXT: user authentication protocol of the default access point.
  • SASL_PLAINTEXT: SASL user authentication protocol.
  • SASL_SSL: SSL user authentication protocol.

sasl_mechanisms

No

String

Message transmission and receiving mechanism. The default value is PLAIN.

sasl_username

No

String

SASL username. This parameter is required when security_protocol is set to SASL_PLAINTEXT or SASL_SSL.

Ignore this parameter when security_protocol is set to PLAINTEXT.

sasl_password

No

String

SASL password. This parameter is required when security_protocol is set to SASL_PLAINTEXT or SASL_SSL.

Ignore this parameter when security_protocol is set to PLAINTEXT.

ssl_ca_content

No

String

CA certificate content. This parameter is required when security_protocol is set to SASL_SSL.

Table 3 PluginKafkaLogMetaConfig

Parameter

Mandatory

Type

Description

system

No

PluginKafkaLogMetaSystem object

System configuration for Kafka log metadata.

call_data

No

PluginKafkaLogMetaCallData object

Metadata invocation data of the Kafka log push plug-in.

Table 4 PluginKafkaLogMetaSystem

Parameter

Mandatory

Type

Description

start_time

No

Boolean

Whether to report the Kafka request start time (Unix timestamp). The default value is true.

request_id

No

Boolean

Whether to report the Kafka request ID. The default value is true.

client_ip

No

Boolean

Whether to report the Kafka client IP address. The default value is true.

api_id

No

Boolean

Whether to report the Kafka API ID.

user_name

No

Boolean

Whether to report the Kafka username.

app_id

No

Boolean

Whether to report the Kafka app ID.

request_time

No

Boolean

Whether to report the Kafka request duration (second). The default value is true.

http_status

No

Boolean

Whether to report the Kafka response code. The default value is true.

server_protocol

No

Boolean

Whether to report the Kafka request protocol version (HTTP/1.0 or HTTP/1.1).

scheme

No

Boolean

Whether to report the Kafka request protocol (HTTP or HTTPS). The default value is true.

request_method

No

Boolean

Whether to report the Kafka request method. The default value is true.

host

No

Boolean

Whether to report the Kafka request host (IP:PORT or Domain_name:PORT). The default value is true.

api_uri_mode

No

Boolean

Whether to report the Kafka request matching mode (NORMAL or SWA).

uri

No

Boolean

Whether to report the Kafka request URI. The default value is true.

request_size

No

Boolean

Whether to report the Kafka request size (byte).

response_size

No

Boolean

Whether to report the Kafka response size (byte).

upstream_uri

No

Boolean

Whether to report the Kafka backend URI.

upstream_addr

No

Boolean

Whether to report the Kafka backend address. The default value is true.

upstream_status

No

Boolean

Whether to report the Kafka backend response code. The default value is true.

upstream_connect_time

No

Boolean

Whether to report the Kafka backend connection time (second).

upstream_header_time

No

Boolean

Whether to report the time (second) spent returning the Kafka backend response header.

upstream_response_time

No

Boolean

Whether to report the Kafka backend response duration (second). The default value is true.

http_x_forwarded_for

No

Boolean

Whether to report the content of x_forwarded_for in the Kafka request. The default value is true.

http_user_agent

No

Boolean

Whether to report the proxy of the Kafka request. The default value is true.

region_id

No

Boolean

Whether to report the region ID of Kafka.

all_upstream_response_time

No

Boolean

Whether to report the time (second) spent receiving all bytes, including the time of retry attempts.

error_type

No

Boolean

Whether to report the Kafka request error type, which can be 0 (non-request throttling) or 1 (request throttling). The default value is true.

auth_type

No

Boolean

Whether to report the API authentication mode of the Kafka request.

access_model1

No

Boolean

Whether to report authentication mode 1 of the Kafka request.

access_model2

No

Boolean

Whether to report authentication mode 2 of the Kafka request. The custom authorizer ID is used for two-factor authentication.

inner_time

No

Boolean

Whether to report the internal processing time (second) of the Kafka request.

proxy_protocol_vni

No

Boolean

Whether to report the virtual network identifier (VNID) in VPCEP for the Kafka request.

proxy_protocol_vpce_id

No

Boolean

Whether to report the VPCEP ID of the Kafka request.

proxy_protocol_addr

No

Boolean

Whether to report the PP2 address of the Kafka request.

body_bytes_sent

No

Boolean

Whether to report the body size of the Kafka request.

api_name

No

Boolean

Whether to report the API name of the Kafka request.

app_name

No

Boolean

Whether to report the app name of the Kafka request.

provider_app_id

No

Boolean

Whether to report the ID of the app to which the API called by the Kafka request belongs.

provider_app_name

No

Boolean

Whether to report the name of the app to which the API called by the Kafka request belongs.

custom_data_log01

No

Boolean

Whether to report reserved log field 01 customized by the Kafka client.

custom_data_log02

No

Boolean

Whether to report reserved log field 02 customized by the Kafka client.

custom_data_log03

No

Boolean

Whether to report reserved log field 03 customized by the Kafka client.

custom_data_log04

No

Boolean

Whether to report reserved log field 04 customized by the Kafka client.

custom_data_log05

No

Boolean

Whether to report reserved log field 05 customized by the Kafka client.

custom_data_log06

No

Boolean

Whether to report reserved log field 06 customized by the Kafka client.

custom_data_log07

No

Boolean

Whether to report reserved log field 07 customized by the Kafka client.

custom_data_log08

No

Boolean

Whether to report reserved log field 08 customized by the Kafka client.

custom_data_log09

No

Boolean

Whether to report reserved log field 09 customized by the Kafka client.

custom_data_log10

No

Boolean

Whether to report reserved log field 10 customized by the Kafka client.

response_source

No

Boolean

Whether to report the Kafka response source. The response source can be local (API gateway) or remote (backend service).

Table 5 PluginKafkaLogMetaCallData

Parameter

Mandatory

Type

Description

log_request_header

No

Boolean

Whether logs include request headers. The default value is false, indicating that request headers are not included.

request_header_filter

No

String

Request header fields that can be included in logs. Separate them with commas (,), and use wildcard characters (*) if necessary.

log_request_query_string

No

Boolean

Whether logs include query strings. The default value is false, indicating that query strings are not included.

request_query_string_filter

No

String

Query strings that can be included in logs. Separate them with commas (,), and use wildcard characters (*) if necessary.

log_request_body

No

Boolean

Whether logs include the request body. The default value is false, indicating that the request body is not included.

log_response_header

No

Boolean

Whether logs include response headers. The default value is false, indicating that response headers are not included.

response_header_filter

No

String

Response header fields that can be included in logs. Separate them with commas (,), and use wildcard characters (*) if necessary.

log_response_body

No

Boolean

Whether logs include the response body. The default value is false, indicating that the response body is not included.

custom_authorizer

No

PluginKafkaLogMetaAuthorizer object

Authentication configuration for Kafka log metadata.

Table 6 PluginKafkaLogMetaAuthorizer

Parameter

Mandatory

Type

Description

frontend

No

Array of strings

Log fields in the response of custom frontend authentication.

backend

No

Array of strings

Log fields in the response of custom backend authentication.