logger_json v1.1.0 LoggerJSON.Plug

Implements Plug behaviour and sends connection stats to Logger with metadata:

  • connection.type - type of connection (Sent or Chunked);
  • connection.method - HTTP request method;
  • connection.request_path - HTTP request path;
  • connection.request_id - value of X-Request-ID response header (see Plug.RequestId);
  • connection.status - HTTP status code sent to a client;
  • client.user_agent - value of User-Agent header;
  • client.ip' - value ofX-Forwarded-Forheader if present, otherwise - remote IP of a connected client; *client.version’ - value of X-API-Version header;

    • system.hostname - system hostname;
    • system.pid - Erlang VM process identifier;
    • runtime.controller - Phoenix controller that processed the request;
    • runtime.action - Phoenix action that processed the request;
    • time - time in microseconds taken to process the request.