add unique ID header to each request and log it
Bug #1895255 reported by
Junien F
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Content Cache Charm |
Fix Released
|
High
|
Haw Loeung |
Bug Description
Hi,
In order to allow following a request through our whole stack, could we please add a header with a unique ID to each request ?
See haproxy's "unique-id-format" and "unique-id-header"
https:/
Ideally this should easily integrate with the k8s nginx ingress so that we can follow the request in k8s as well.
Thanks !
Related branches
~hloeung/content-cache-charm:request-unique-id
- Barry Price: Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 789 lines (+101/-12)16 files modifiedlib/haproxy.py (+1/-0)
templates/haproxy_cfg.tmpl (+1/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+14/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+3/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+4/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+14/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+4/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+14/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+14/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+14/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+3/-1)
tests/unit/files/haproxy_config_rendered_listen_stanzas_test_output.txt (+3/-0)
tests/unit/files/haproxy_config_rendered_listen_stanzas_test_output2.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_listen_stanzas_test_output3.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_test_output.txt (+4/-1)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+4/-1)
~hloeung/content-cache-charm:request-unique-id
- Barry Price: Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 167 lines (+26/-1)13 files modifiedfiles/nginx-logging-format.conf (+2/-1)
templates/haproxy_cfg.tmpl (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_test_output.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+2/-0)
Changed in content-cache-charm: | |
importance: | Medium → High |
Changed in content-cache-charm: | |
assignee: | nobody → Haw Loeung (hloeung) |
Changed in content-cache-charm: | |
status: | Triaged → In Progress |
Changed in content-cache-charm: | |
status: | In Progress → Fix Committed |
Changed in content-cache-charm: | |
status: | Fix Committed → Fix Released |
Changed in content-cache-charm: | |
status: | Fix Released → In Progress |
Changed in content-cache-charm: | |
status: | In Progress → Fix Committed |
Changed in content-cache-charm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
For k8s ingress it should be easy enough to log it by changed log-format in the ingress ConfigMap :
https:/ /github. com/kubernetes/ ingress- nginx/blob/ ca74f9ad7d9a907 2071dc94bfb8b5e b64f1e1fb0/ docs/user- guide/nginx- configuration/ configmap. md#log- format- upstream
https:/ /nginx. org/en/ docs/http/ ngx_http_ log_module. html#log_ format