{"action":"created","issue":{"url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/535","repository_url":"https://api.github.com/repos/zalando-zmon/zmon-controller","labels_url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/535/comments","events_url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/535/events","html_url":"https://github.com/zalando-zmon/zmon-controller/issues/535","id":291170677,"node_id":"MDU6SXNzdWUyOTExNzA2Nzc=","number":535,"title":"Exceptions occurring during check executions are not formatted - so not easily readable","user":{"login":"vetinari","id":53407,"node_id":"MDQ6VXNlcjUzNDA3","avatar_url":"https://avatars1.githubusercontent.com/u/53407?v=4","gravatar_id":"","url":"https://api.github.com/users/vetinari","html_url":"https://github.com/vetinari","followers_url":"https://api.github.com/users/vetinari/followers","following_url":"https://api.github.com/users/vetinari/following{/other_user}","gists_url":"https://api.github.com/users/vetinari/gists{/gist_id}","starred_url":"https://api.github.com/users/vetinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vetinari/subscriptions","organizations_url":"https://api.github.com/users/vetinari/orgs","repos_url":"https://api.github.com/users/vetinari/repos","events_url":"https://api.github.com/users/vetinari/events{/privacy}","received_events_url":"https://api.github.com/users/vetinari/received_events","type":"User","site_admin":false},"labels":[{"id":991802128,"node_id":"MDU6TGFiZWw5OTE4MDIxMjg=","url":"https://api.github.com/repos/zalando-zmon/zmon-controller/labels/Revisit","name":"Revisit","color":"f4bda6","default":false},{"id":163870185,"node_id":"MDU6TGFiZWwxNjM4NzAxODU=","url":"https://api.github.com/repos/zalando-zmon/zmon-controller/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-24T11:14:23Z","updated_at":"2018-08-01T12:35:46Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"With the merge of https://github.com/zalando-zmon/zmon-worker/pull/310 we get a stack trace in the \"value\" field of a check like\r\n```\r\n\"Traceback (most recent call last):\\n  File \\\"/usr/local/lib/python2.7/dist-packages/zmon_worker-0.1-py2.7.egg/zmon_worker_monitor/zmon_worker/tasks/main.py\\\", line 1200, in _get_check_result_internal\\n    result = safe_eval(cmd, eval_source='<check-command>', **ctx)\\n  File \\\"/usr/local/lib/python2.7/dist-packages/zmon_worker-0.1-py2.7.egg/zmon_worker_monitor/zmon_worker/common/eval.py\\\", line 187, in safe_eval\\n    return c()  # if a function will return another callable, we will not call it\\n  File \\\"<check-command>\\\", line 3, in check\\nKeyError: 'foo'\\n\"\r\n```\r\nThis should be formatted nicely, so it's readable and not just one long line.\r\n\r\nThe stack trace above was created by running\r\n```python\r\ndef check():\r\n    foo = {'bar': 'baz'}\r\n    return foo['foo']\r\n```\r\nin trial run"},"comment":{"url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/comments/409559454","html_url":"https://github.com/zalando-zmon/zmon-controller/issues/535#issuecomment-409559454","issue_url":"https://api.github.com/repos/zalando-zmon/zmon-controller/issues/535","id":409559454,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTU1OTQ1NA==","user":{"login":"beverage","id":2602047,"node_id":"MDQ6VXNlcjI2MDIwNDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2602047?v=4","gravatar_id":"","url":"https://api.github.com/users/beverage","html_url":"https://github.com/beverage","followers_url":"https://api.github.com/users/beverage/followers","following_url":"https://api.github.com/users/beverage/following{/other_user}","gists_url":"https://api.github.com/users/beverage/gists{/gist_id}","starred_url":"https://api.github.com/users/beverage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beverage/subscriptions","organizations_url":"https://api.github.com/users/beverage/orgs","repos_url":"https://api.github.com/users/beverage/repos","events_url":"https://api.github.com/users/beverage/events{/privacy}","received_events_url":"https://api.github.com/users/beverage/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T12:35:46Z","updated_at":"2018-08-01T12:35:46Z","author_association":"MEMBER","body":"Example: \r\n\r\nht<span>tps://</span>zmon.zalando.net/#/trial-run?json=%7B%22entities%22:%5B%7B%22type%22:%22local%22,%22infrastructure_account%22:%22aws:`<aws_account_id>`%22%7D%5D,%22entities_exclude%22:%5B%5D,%22parameters%22:%7B%7D,%22interval%22:120,%22name%22:%22foo%22,%22description%22:%22bar%22,%22owning_team%22:%22Eagle%20Eye%22,%22check_command%22:%22def%20check():%5Cn%20%20%20%20return%205%2F0%22,%22alert_condition%22:%22True%22%7D"}}
{"actor":{"display_login":"beverage"}}