{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/skipper/issues/864","repository_url":"https://api.github.com/repos/zalando/skipper","labels_url":"https://api.github.com/repos/zalando/skipper/issues/864/labels{/name}","comments_url":"https://api.github.com/repos/zalando/skipper/issues/864/comments","events_url":"https://api.github.com/repos/zalando/skipper/issues/864/events","html_url":"https://github.com/zalando/skipper/pull/864","id":384808753,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzOTIxODIz","number":864,"title":"fix: client timeouts should be counted as 499 errors","user":{"login":"szuecs","id":50872,"node_id":"MDQ6VXNlcjUwODcy","avatar_url":"https://avatars2.githubusercontent.com/u/50872?v=4","gravatar_id":"","url":"https://api.github.com/users/szuecs","html_url":"https://github.com/szuecs","followers_url":"https://api.github.com/users/szuecs/followers","following_url":"https://api.github.com/users/szuecs/following{/other_user}","gists_url":"https://api.github.com/users/szuecs/gists{/gist_id}","starred_url":"https://api.github.com/users/szuecs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szuecs/subscriptions","organizations_url":"https://api.github.com/users/szuecs/orgs","repos_url":"https://api.github.com/users/szuecs/repos","events_url":"https://api.github.com/users/szuecs/events{/privacy}","received_events_url":"https://api.github.com/users/szuecs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-27T14:01:46Z","updated_at":"2018-11-28T11:08:27Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/zalando/skipper/pulls/864","html_url":"https://github.com/zalando/skipper/pull/864","diff_url":"https://github.com/zalando/skipper/pull/864.diff","patch_url":"https://github.com/zalando/skipper/pull/864.patch"},"body":"fix issue found while investigating #863\r\n \r\n## Test setup\r\n\r\nbackend\r\n```\r\n% ./bin/skipper -address :9001 -inline-routes \"r: * -> latency(\\\"2s\\\") -> inlineContent(\\\"B\\\") -> status(200) -> <shunt>;\"               test/lb-proxy-bench\r\n[APP]INFO[0000] Expose metrics in codahale format\r\n[APP]INFO[0000] support listener on :9911\r\n[APP]INFO[0000] proxy listener on :9001\r\n[APP]INFO[0000] certPathTLS or keyPathTLS not found, defaulting to HTTP\r\n[APP]INFO[0000] route settings, reset, route: r: * -> latency(\"2s\") -> inlineContent(\"B\") -> status(200) -> <shunt>\r\n[APP]INFO[0000] route settings received\r\n[APP]INFO[0000] route settings applied\r\n127.0.0.1 - - [27/Nov/2018:11:51:23 +0100] \"GET / HTTP/1.1\" 200 1 \"-\" \"Go-http-client/1.1\" 2000 127.0.0.1:9001 - -\r\n```\r\n\r\nproxy\r\n```\r\n% ./bin/skipper -address :9090 -inline-routes \"r: * -> \\\"http://127.0.0.1:9001/\\\"\" -support-listener :9091\r\n[APP]INFO[0000] Expose metrics in codahale format\r\n[APP]INFO[0000] support listener on :9091\r\n[APP]INFO[0000] proxy listener on :9090\r\n[APP]INFO[0000] certPathTLS or keyPathTLS not found, defaulting to HTTP\r\n[APP]INFO[0000] route settings, reset, route: r: * -> \"http://127.0.0.1:9001/\"\r\n[APP]INFO[0000] route settings received\r\n[APP]INFO[0000] route settings applied\r\n\r\n[APP]INFO[0010] Client request: context canceled\r\n127.0.0.1 - - [27/Nov/2018:14:55:51 +0100] \"GET / HTTP/1.1\" 499 1 \"-\" \"curl/7.49.0\" 2012 test.example.org - -\r\n```\r\n\r\nclient:\r\n```\r\n% curl -v -H\"Host: test.example.org\" 127.0.0.1:9090/ -m 1                                                                     test/lb-proxy-bench\r\n*   Trying 127.0.0.1...\r\n* Connected to 127.0.0.1 (127.0.0.1) port 9090 (#0)\r\n> GET / HTTP/1.1\r\n> Host: test.example.org\r\n> User-Agent: curl/7.49.0\r\n> Accept: */*\r\n> \r\n* Operation timed out after 1001 milliseconds with 0 bytes received\r\n* Closing connection 0\r\ncurl: (28) Operation timed out after 1001 milliseconds with 0 bytes received\r\nzsh: exit 28    curl -v -H\"Host: test.example.org\" 127.0.0.1:9090/ -m 1\r\n```\r\n\r\nmetrics should be counted as 499 \r\n```\r\n% curl -s http://127.0.0.1:9091/metrics | jq \".timers.\\\"skipper.response.499.GET.skipper.r\\\"\"                          \r\n{\r\n  \"15m.rate\": 0.1722596095242093,\r\n  \"1m.rate\": 0.029093496361398307,\r\n  \"5m.rate\": 0.12840894646419837,\r\n  \"75%\": 373782,\r\n  \"95%\": 373782,\r\n  \"99%\": 373782,\r\n  \"99.9%\": 373782,\r\n  \"count\": 2,\r\n  \"max\": 373782,\r\n  \"mean\": 261028.5,\r\n  \"mean.rate\": 0.013810728977478225,\r\n  \"median\": 261028.5,\r\n  \"min\": 148275,\r\n  \"stddev\": 112753.5\r\n}\r\n```\r\n\r\nSigned-off-by: Sandor Szücs <sandor.szuecs@zalando.de>"},"comment":{"url":"https://api.github.com/repos/zalando/skipper/issues/comments/442409299","html_url":"https://github.com/zalando/skipper/pull/864#issuecomment-442409299","issue_url":"https://api.github.com/repos/zalando/skipper/issues/864","id":442409299,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQwOTI5OQ==","user":{"login":"aryszka","id":733217,"node_id":"MDQ6VXNlcjczMzIxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/733217?v=4","gravatar_id":"","url":"https://api.github.com/users/aryszka","html_url":"https://github.com/aryszka","followers_url":"https://api.github.com/users/aryszka/followers","following_url":"https://api.github.com/users/aryszka/following{/other_user}","gists_url":"https://api.github.com/users/aryszka/gists{/gist_id}","starred_url":"https://api.github.com/users/aryszka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryszka/subscriptions","organizations_url":"https://api.github.com/users/aryszka/orgs","repos_url":"https://api.github.com/users/aryszka/repos","events_url":"https://api.github.com/users/aryszka/events{/privacy}","received_events_url":"https://api.github.com/users/aryszka/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T11:08:27Z","updated_at":"2018-11-28T11:08:27Z","author_association":"MEMBER","body":":+1: "}}
{"actor":{"display_login":"aryszka"}}