{"action":"created","issue":{"url":"https://api.github.com/repos/ory/hydra/issues/827","repository_url":"https://api.github.com/repos/ory/hydra","labels_url":"https://api.github.com/repos/ory/hydra/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/ory/hydra/issues/827/comments","events_url":"https://api.github.com/repos/ory/hydra/issues/827/events","html_url":"https://github.com/ory/hydra/pull/827","id":317899949,"number":827,"title":"[Prometheus] Add new prometheus metrics and metrics endpoint","user":{"login":"dolbik","id":8651854,"avatar_url":"https://avatars0.githubusercontent.com/u/8651854?v=4","gravatar_id":"","url":"https://api.github.com/users/dolbik","html_url":"https://github.com/dolbik","followers_url":"https://api.github.com/users/dolbik/followers","following_url":"https://api.github.com/users/dolbik/following{/other_user}","gists_url":"https://api.github.com/users/dolbik/gists{/gist_id}","starred_url":"https://api.github.com/users/dolbik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolbik/subscriptions","organizations_url":"https://api.github.com/users/dolbik/orgs","repos_url":"https://api.github.com/users/dolbik/repos","events_url":"https://api.github.com/users/dolbik/events{/privacy}","received_events_url":"https://api.github.com/users/dolbik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-26T06:55:35Z","updated_at":"2018-05-02T15:19:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ory/hydra/pulls/827","html_url":"https://github.com/ory/hydra/pull/827","diff_url":"https://github.com/ory/hydra/pull/827.diff","patch_url":"https://github.com/ory/hydra/pull/827.patch"},"body":"Signed-off-by: Dmitry Dolbik <dolbik@gmail.com>\r\n\r\nIt is draft implementation to support Prometheus in Hydra (https://github.com/ory/hydra/issues/669). Prometheus collects all metrics and more then current telemetry does. Current telemetry and prometheus works together in this pull request\r\nAdded two new Prometheus metrics:\r\n- Secure token service requests served per endpoint\r\n- Secure token service response time per endpoint\r\n\r\nThe result of prometheus:\r\n`\r\ngo_gc_duration_seconds{quantile=\"0\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\r\ngo_gc_duration_seconds{quantile=\"1\"} 0\r\ngo_gc_duration_seconds_sum 0\r\ngo_gc_duration_seconds_count 0\r\ngo_goroutines 16\r\ngo_memstats_alloc_bytes 3.479416e+06\r\ngo_memstats_alloc_bytes_total 3.479416e+06\r\ngo_memstats_buck_hash_sys_bytes 1.445704e+06\r\ngo_memstats_frees_total 1375\r\ngo_memstats_gc_sys_bytes 268288\r\ngo_memstats_heap_alloc_bytes 3.479416e+06\r\ngo_memstats_heap_idle_bytes 679936\r\ngo_memstats_heap_inuse_bytes 4.857856e+06\r\ngo_memstats_heap_objects 19294\r\ngo_memstats_heap_released_bytes_total 0\r\ngo_memstats_heap_sys_bytes 5.537792e+06\r\ngo_memstats_last_gc_time_seconds 0\r\ngo_memstats_lookups_total 12\r\ngo_memstats_mallocs_total 20669\r\ngo_memstats_mcache_inuse_bytes 13888\r\ngo_memstats_mcache_sys_bytes 16384\r\ngo_memstats_mspan_inuse_bytes 59280\r\ngo_memstats_mspan_sys_bytes 65536\r\ngo_memstats_next_gc_bytes 4.473924e+06\r\ngo_memstats_other_sys_bytes 1.028528e+06\r\ngo_memstats_stack_inuse_bytes 753664\r\ngo_memstats_stack_sys_bytes 753664\r\ngo_memstats_sys_bytes 9.115896e+06\r\nsts_requests_total{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\"} 1\r\nsts_requests_total{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.005\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.01\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.025\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.05\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.1\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.25\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"0.5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"1\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"2.5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"10\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\",le=\"+Inf\"} 1\r\nsts_response_time_seconds_sum{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\"} 0.001876666\r\nsts_response_time_seconds_count{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/metrics\",hash=\"undefined\",version=\"dev-master\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.005\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.01\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.025\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.05\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.1\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.25\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"0.5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"1\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"2.5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"5\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"10\"} 1\r\nsts_response_time_seconds_bucket{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\",le=\"+Inf\"} 1\r\nsts_response_time_seconds_sum{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\"} 0.000721316\r\nsts_response_time_seconds_count{buildTime=\"2018-04-26 06:44:37.592314 +0000 UTC\",endpoint=\"/health/status\",hash=\"undefined\",version=\"dev-master\"} 1`"},"comment":{"url":"https://api.github.com/repos/ory/hydra/issues/comments/386015462","html_url":"https://github.com/ory/hydra/pull/827#issuecomment-386015462","issue_url":"https://api.github.com/repos/ory/hydra/issues/827","id":386015462,"user":{"login":"dolbik","id":8651854,"avatar_url":"https://avatars0.githubusercontent.com/u/8651854?v=4","gravatar_id":"","url":"https://api.github.com/users/dolbik","html_url":"https://github.com/dolbik","followers_url":"https://api.github.com/users/dolbik/followers","following_url":"https://api.github.com/users/dolbik/following{/other_user}","gists_url":"https://api.github.com/users/dolbik/gists{/gist_id}","starred_url":"https://api.github.com/users/dolbik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolbik/subscriptions","organizations_url":"https://api.github.com/users/dolbik/orgs","repos_url":"https://api.github.com/users/dolbik/repos","events_url":"https://api.github.com/users/dolbik/events{/privacy}","received_events_url":"https://api.github.com/users/dolbik/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T15:19:47Z","updated_at":"2018-05-02T15:19:47Z","author_association":"CONTRIBUTOR","body":"@arekkas Are any actions needed from my side? "}}
{"actor":{"display_login":"dolbik"}}