Tcp Access Log
Structured JSON logging of TCP connection events (connect and disconnect)
Category: Practical
Task: Structured JSON logging of TCP connection events (connect and disconnect)
Prerequisites: The product runtime and any backend services referenced by this configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# TCP Access Log
#
# Structured JSON logging of TCP connection events (connect
# and disconnect). Works on TCP listeners.
#
# Usage:
# cargo run -p praxis-proxy -- -c examples/configs/observability/tcp-access-log.yaml
#
# Exercise:
# nc localhost 5432 # observe connect/disconnect log lines
insecure_options:
allow_private_upstreams: true
listeners:
- name: db
address: "127.0.0.1:5432"
protocol: tcp
upstream: "127.0.0.1:15432"
filter_chains:
- logging
filter_chains:
- name: logging
filters:
- filter: tcp_access_log