HTTP variables
$connection_time variable (HTTP)
Elapsed connection lifetime in seconds with subsecond precision; contrasts with per-request latency. Version: 1.19.10. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
Formal Syntax & Structure
nginx syntaxnginx
$connection_timeWorking Example
Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_connection_time escape=json '{"observed":"$connection_time"}';