{"id":26164742,"url":"https://github.com/optum/kong-tx-debugger","last_synced_at":"2026-04-18T23:31:39.314Z","repository":{"id":48235687,"uuid":"294231713","full_name":"Optum/kong-tx-debugger","owner":"Optum","description":"Log API Request and Response Data to Kong STDOUT","archived":false,"fork":false,"pushed_at":"2021-08-04T14:34:17.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T15:51:10.992Z","etag":null,"topics":["api-gateway","kong","optum","tx-debugging"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Optum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-09T21:17:37.000Z","updated_at":"2022-09-22T03:25:02.000Z","dependencies_parsed_at":"2022-08-26T00:14:48.609Z","dependency_job_id":null,"html_url":"https://github.com/Optum/kong-tx-debugger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Optum/kong-tx-debugger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fkong-tx-debugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fkong-tx-debugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fkong-tx-debugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fkong-tx-debugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Optum","download_url":"https://codeload.github.com/Optum/kong-tx-debugger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fkong-tx-debugger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28012096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","kong","optum","tx-debugging"],"created_at":"2025-03-11T15:40:04.208Z","updated_at":"2025-12-24T23:06:31.901Z","avatar_url":"https://github.com/Optum.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kong Tx Debugger\nLog API Request and Response Data to Kong STDOUT\n\n## Configuration\nYou can add the plugin to a ```route``` kong resource with the following request:\n\n```bash\n$ curl -X POST http://kong:8001/routes/{route name or id}/plugins \\\n    --data \"name=kong-tx-debugger\" \\\n    --data \"config.log_request_headers=true\" \\\n    --data \"config.log_request_query_params=true\" \\\n    --data \"config.log_request_body=true\" \\\n    --data \"config.log_response_headers=true\" \\\n    --data \"config.log_response_body=true\" \\\n    --data \"config.max_response_body_size=65536\" \\\n    --data \"config.log_on_response_status=500\" \\\n    --data \"config.ngx_log_buffer_size=4012\" \\\n```\n\n## Sample Log Output:\n\n```\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:33 [kong-tx-debugger] -------- START OF LOGGED TX -------- while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #1 host : some-host.company.com while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #2 x-forwarded-proto : https while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #3 x-forwarded-for : 10.xxx.xxx.x while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #4 x-forwarded-host : some-host.company.com while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #5 connection : Close while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #6 forwarded : for=10.xxx.xxx.x;host=some-host.company.com;proto=https;proto-version= while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #7 headertest : test1 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:38 [kong-tx-debugger] Request Header #8 x-forwarded-port : 443 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:62 [kong-tx-debugger] Request Body: {\"message\":\"test\"} while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #1 content-type : application/json; charset=utf-8 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #2 company-cid-ext : 4c956f83-b7ba-4024-845d-7041c25bf7e7#27478 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #3 connection : close while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #4 x-ratelimit-limit-second : 500 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #5 ratelimit-reset : 1 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #6 content-length : 21 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #7 x-ratelimit-remaining-second : 499 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #8 x-response-latency : 297 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #9 ratelimit-limit : 500 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:69 [kong-tx-debugger] Response Header #10 ratelimit-remaining : 499 while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:85 [kong-tx-debugger] Response Body: {\"message\":\"Success\"} while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n2020/09/08 19:07:31 [notice] 19456#0: *9908058 [kong] handler.lua:88 [kong-tx-debugger] -------- END OF LOGGED TX -------- while logging request, client: 10.xxx.xxx.x, server: kong, request: \"GET /some/route HTTP/1.1\", host: \"some-host.company.com\"\n```\n\nWe recommend applying this to individual kong ```route``` or ```service``` resource and be sure to remove it when done debugging, as all the additional logging and request/response body reading hurts runtime gateway performance slightly.\n\n\n## Supported Kong Releases\nKong \u003e= 2.X.X\n\n## Installation\nRecommended:\n```\n$ luarocks install kong-tx-debugger\n```\nOther:\n```\n$ git clone https://github.com/Optum/kong-tx-debugger.git /path/to/kong/plugins/kong-tx-debugger\n$ cd /path/to/kong/plugins/kong-tx-debugger\n$ luarocks make *.rockspec\n```\n\n## Maintainers\n[jeremyjpj0916](https://github.com/jeremyjpj0916)\n\n\nFeel free to open issues, or refer to our [Contribution Guidelines](https://github.com/Optum/kong-tx-debugger/blob/master/CONTRIBUTING.md) if you have any questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Fkong-tx-debugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptum%2Fkong-tx-debugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Fkong-tx-debugger/lists"}