apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.44k stars 2.51k forks source link

Feature : Support for Protobuf in udp and tcp logger for sending logs information #9319

Open codifierr opened 1 year ago

codifierr commented 1 year ago

Description

The current udp and tcp logger support JSON as payload format. UDP logger: https://apisix.apache.org/docs/apisix/plugins/udp-logger/#metadata TCP logger: https://apisix.apache.org/docs/apisix/plugins/tcp-logger/#metadata

Example : "log_format": { "host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr" }

The request in this feature is to support protobuf for information transfer to a udp or tcp server. Protobuf format : https://github.com/protocolbuffers/protobuf

Advantages 1.) Efficiency: Protobuf is a binary serialization format that is designed for efficient encoding and decoding of data. 2.) Flexibility: Protobuf provides support for versioning and schema evolution, which allows for more flexibility in log data structures over time. 3.) Maintainability: Protobuf uses a schema definition language (IDL) to define the structure of log data, which provides a clear contract between log producers and consumers.

Sn0rt commented 1 year ago

sounds interesting. @codifierr are you interesting in this feature ? or raise a proposal for discuss

codifierr commented 1 year ago

sounds interesting. @codifierr are you interesting in this feature ? or raise a proposal for discuss

Yes. We want to use this for our use case.

codifierr commented 4 months ago

Any update on this request?