From 29a5078fcf649ccdfe536e2bdba932a763f2dcae Mon Sep 17 00:00:00 2001 From: Benjamin Dos Santos Date: Fri, 21 Feb 2020 09:38:25 +0100 Subject: [PATCH 1/2] feat(php-lol): append correlation id to nginx's access/errors logs --- dockerfiles/php-lol/nginx.conf | 3 ++- spec/php-lol_7.2_spec.rb | 2 +- spec/php-lol_7.3_spec.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dockerfiles/php-lol/nginx.conf b/dockerfiles/php-lol/nginx.conf index 61a7fc06..a6e398f2 100644 --- a/dockerfiles/php-lol/nginx.conf +++ b/dockerfiles/php-lol/nginx.conf @@ -29,7 +29,8 @@ http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; + '"$http_user_agent" "$http_x_forwarded_for"' + 'request-id:"$sent_http_x_request_id"'; access_log /dev/stdout main; error_log /dev/stderr error; diff --git a/spec/php-lol_7.2_spec.rb b/spec/php-lol_7.2_spec.rb index 1bc50a26..5952670d 100644 --- a/spec/php-lol_7.2_spec.rb +++ b/spec/php-lol_7.2_spec.rb @@ -110,7 +110,7 @@ it { should be_mode 444 } its(:sha256sum) { should eq \ - 'c2a3b30907df02546789c3ecdb6702d83e8500d95c74f91f6cc95c6fc276fbff' + '898ffc967239446f4e65c69e0c87d2712ca6a4553736f9fbd2c7ecc415075318' } end diff --git a/spec/php-lol_7.3_spec.rb b/spec/php-lol_7.3_spec.rb index 25c8ac69..95d78afa 100644 --- a/spec/php-lol_7.3_spec.rb +++ b/spec/php-lol_7.3_spec.rb @@ -110,7 +110,7 @@ it { should be_mode 444 } its(:sha256sum) { should eq \ - 'c2a3b30907df02546789c3ecdb6702d83e8500d95c74f91f6cc95c6fc276fbff' + '898ffc967239446f4e65c69e0c87d2712ca6a4553736f9fbd2c7ecc415075318' } end From dff220d8626aa81ab5c6d208483749636c17a8cc Mon Sep 17 00:00:00 2001 From: Benjamin Dos Santos Date: Fri, 21 Feb 2020 22:30:50 +0100 Subject: [PATCH 2/2] fixup! feat(php-lol): append correlation id to nginx's access/errors logs --- dockerfiles/php-lol/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/php-lol/nginx.conf b/dockerfiles/php-lol/nginx.conf index a6e398f2..d43e147a 100644 --- a/dockerfiles/php-lol/nginx.conf +++ b/dockerfiles/php-lol/nginx.conf @@ -29,7 +29,7 @@ http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"' + '"$http_user_agent" "$http_x_forwarded_for" ' 'request-id:"$sent_http_x_request_id"'; access_log /dev/stdout main;