Skip to content

Commit

Permalink
Merge pull request #332 from headwaymaps/mkirk/nginx-metrics
Browse files Browse the repository at this point in the history
include response time in nginx diagnostics
  • Loading branch information
michaelkirk authored Mar 23, 2024
2 parents 956fc5d + 31fd03b commit 1d6cae3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 15 additions & 0 deletions services/frontend/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,22 @@ http {

proxy_http_version 1.1;

log_format apm '[a] time="$time_local" req_id=$request_id client=$remote_addr '
'method=$request_method request="$request" '
'request_length=$request_length '
'status=$status bytes_sent=$bytes_sent '
'body_bytes_sent=$body_bytes_sent '
'referer=$http_referer '
'user_agent="$http_user_agent" '
'upstream_addr=$upstream_addr '
'upstream_status=$upstream_status '
'request_time=$request_time '
'upstream_response_time=$upstream_response_time '
'upstream_connect_time=$upstream_connect_time '
'upstream_header_time=$upstream_header_time';

server {
access_log /var/log/nginx/access.log apm;
resolver ${HEADWAY_RESOLVER};
listen ${HEADWAY_HTTP_PORT} default_server;

Expand Down
2 changes: 0 additions & 2 deletions services/travelmux/src/api/v2/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ impl PlanResponse {
mode: TravelMode,
valhalla: valhalla_api::ValhallaRouteResponseResult,
) -> PlanResult {
log::info!("valhalla response: {:?}", valhalla);

let valhalla = match valhalla {
valhalla_api::ValhallaRouteResponseResult::Ok(valhalla) => valhalla,
valhalla_api::ValhallaRouteResponseResult::Err(err) => {
Expand Down

0 comments on commit 1d6cae3

Please sign in to comment.