{"action":"created","issue":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/109","labels_url":"https://api.github.com/repos/graphql/graphql-js/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/109/comments","events_url":"https://api.github.com/repos/graphql/graphql-js/issues/109/events","html_url":"https://github.com/graphql/graphql-js/issues/109","id":99548762,"number":109,"title":"Instrument GraphQL and expose data with built-in type","user":{"login":"KyleAMathews","id":71047,"avatar_url":"https://avatars.githubusercontent.com/u/71047?v=3","gravatar_id":"","url":"https://api.github.com/users/KyleAMathews","html_url":"https://github.com/KyleAMathews","followers_url":"https://api.github.com/users/KyleAMathews/followers","following_url":"https://api.github.com/users/KyleAMathews/following{/other_user}","gists_url":"https://api.github.com/users/KyleAMathews/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleAMathews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleAMathews/subscriptions","organizations_url":"https://api.github.com/users/KyleAMathews/orgs","repos_url":"https://api.github.com/users/KyleAMathews/repos","events_url":"https://api.github.com/users/KyleAMathews/events{/privacy}","received_events_url":"https://api.github.com/users/KyleAMathews/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-07T00:06:36Z","updated_at":"2015-08-08T01:11:19Z","closed_at":null,"body":"Was just brainstorming how cool it'd be if GraphQL was self-instrumented. Imagine if GraphQL logged every query + resolve timings for each field AND exposed all this data as a built-in type.\r\n\r\nOn top of this you could build:\r\n* Monitoring (e.g. if query times for this customer critical query goes above 100 ms, send an alert)\r\n* Something analogous to DBs' slow query log\r\n* Build tool similar to GraphiQL but for ops. Connect to your production system and watch a live log of queries. Show histogram of 20 slowest queries over the past week. Zoom in on trouble spots and prioritize speeding those queries.\r\n* Audit logs for users.\r\n* etc.\r\n\r\nThe default implementation would be in-memory but easily overridable for any serious install so logs could be persisted.\r\n\r\nThoughts? What does Facebook do for instrumenting/logging GraphQL?\r\n\r\nThis is potentially a *huge* advantage to using GraphQL. Monitoring/alerting/auditing is freaking hard and this would standardize a big chunk of it."},"comment":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/comments/128877681","html_url":"https://github.com/graphql/graphql-js/issues/109#issuecomment-128877681","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/109","id":128877681,"user":{"login":"johanatan","id":583903,"avatar_url":"https://avatars.githubusercontent.com/u/583903?v=3","gravatar_id":"","url":"https://api.github.com/users/johanatan","html_url":"https://github.com/johanatan","followers_url":"https://api.github.com/users/johanatan/followers","following_url":"https://api.github.com/users/johanatan/following{/other_user}","gists_url":"https://api.github.com/users/johanatan/gists{/gist_id}","starred_url":"https://api.github.com/users/johanatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanatan/subscriptions","organizations_url":"https://api.github.com/users/johanatan/orgs","repos_url":"https://api.github.com/users/johanatan/repos","events_url":"https://api.github.com/users/johanatan/events{/privacy}","received_events_url":"https://api.github.com/users/johanatan/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T01:11:19Z","updated_at":"2015-08-08T01:11:19Z","body":"+1 to this."}}