Skip to content

Commit

Permalink
add example nginx conf setting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefafafan committed Nov 23, 2024
1 parent 3df3a06 commit 9ae594a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ seki parses the following keys, make sure the access log has these:
- `status`
- `response_time`

For nginx, set the log_format to something like this:

```nginx.conf
log_format json escape=json '{'
'"time":"$time_iso8601",'
'"host":"$remote_addr",'
'"method":"$request_method",'
'"uri":"$request_uri",'
'"status":"$status",'
'"body_bytes":"$body_bytes_sent",'
'"referer":"$http_referer",'
'"ua":"$http_user_agent",'
'"request_time":"$request_time",'
'"response_time":"$upstream_response_time"'
'}';
```

### Grouping endpoints with the config file

Sometimes you will want to group endpoints together (for example, `/post/123` and `/post/456`).
Expand Down

0 comments on commit 9ae594a

Please sign in to comment.