Created
January 3, 2019 01:07
-
-
Save mikhailov/dfb0b667ea94ce324a615adc35fe359c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format json '{' | |
'"http":{' | |
'"method":"$request_method",' | |
'"request_id":"$request_id",' | |
'"status_code":$status,' | |
'"content_type":"$content_type",' | |
'"url":"$request_uri",' | |
'"url_details":{' | |
'"path":"$uri",' | |
'"scheme":"$scheme",' | |
'"queryString":{' | |
'"concurrency":$upstream_http_x_concurrency' | |
'}' | |
'}' | |
'},' | |
'"network":{' | |
'"bytes_written":$bytes_sent,' | |
'"client":{' | |
'"ip":"$remote_addr",' | |
'"port":$remote_port' | |
'},' | |
'"destination":{' | |
'"ip":"$server_addr",' | |
'"port":$server_port' | |
'},' | |
'"docker":{' | |
'"container_ip":"$upstream_addr",' | |
'"container_id":"$upstream_http_x_container_id"' | |
'},' | |
'"tcpinfo":{' | |
'"rtt":$tcpinfo_rtt,' | |
'"rttvar":$tcpinfo_rttvar,' | |
'"snd_cwnd":$tcpinfo_snd_cwnd,' | |
'"rcv_space":$tcpinfo_rcv_space' | |
'},' | |
'"nginx":{' | |
'"request_time":$request_time,' | |
'"upstream_connect_time":$upstream_connect_time,' | |
'"upstream_response_time":$upstream_response_time,' | |
'"upstream_header_time":$upstream_header_time' | |
'},' | |
'"unicorn":{' | |
'"queueing_delay":$upstream_http_x_queueing_delay,' | |
'"service_time":$upstream_http_x_service_time' | |
'}' | |
'},' | |
'"usr":{' | |
'"account_id":$upstream_http_x_account_id,' | |
'"id":$upstream_http_x_user_id' | |
'}' | |
'}' escape=json; |
Author
mikhailov
commented
Oct 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment