mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-02 21:22:51 +02:00
Latency logging
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# Log format to include request latency
|
||||
log_format custom_main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||
'rt=$request_time';
|
||||
|
||||
upstream api_server {
|
||||
# fail_timeout=0 means we always retry an upstream even if it failed
|
||||
# to return a good HTTP response
|
||||
@@ -20,6 +26,8 @@ server {
|
||||
|
||||
client_max_body_size 5G; # Maximum upload size
|
||||
|
||||
access_log /var/log/nginx/access.log custom_main;
|
||||
|
||||
# Match both /api/* and /openapi.json in a single rule
|
||||
location ~ ^/(api|openapi.json)(/.*)?$ {
|
||||
# Rewrite /api prefixed matched paths
|
||||
|
@@ -1,3 +1,9 @@
|
||||
# Override log format to include request latency
|
||||
log_format custom_main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||
'rt=$request_time';
|
||||
|
||||
upstream api_server {
|
||||
# fail_timeout=0 means we always retry an upstream even if it failed
|
||||
# to return a good HTTP response
|
||||
@@ -20,6 +26,8 @@ server {
|
||||
|
||||
client_max_body_size 5G; # Maximum upload size
|
||||
|
||||
access_log /var/log/nginx/access.log custom_main;
|
||||
|
||||
# Match both /api/* and /openapi.json in a single rule
|
||||
location ~ ^/(api|openapi.json)(/.*)?$ {
|
||||
# Rewrite /api prefixed matched paths
|
||||
@@ -58,3 +66,4 @@ server {
|
||||
proxy_pass http://web_server;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,9 @@
|
||||
# Log format to include request latency
|
||||
log_format custom_main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||
'rt=$request_time';
|
||||
|
||||
upstream api_server {
|
||||
# fail_timeout=0 means we always retry an upstream even if it failed
|
||||
# to return a good HTTP response
|
||||
@@ -20,6 +26,8 @@ server {
|
||||
|
||||
client_max_body_size 5G; # Maximum upload size
|
||||
|
||||
access_log /var/log/nginx/access.log custom_main;
|
||||
|
||||
# Match both /api/* and /openapi.json in a single rule
|
||||
location ~ ^/(api|openapi.json)(/.*)?$ {
|
||||
# Rewrite /api prefixed matched paths
|
||||
|
Reference in New Issue
Block a user