{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/263","repository_url":"https://api.github.com/repos/DataDog/dd-trace-js","labels_url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/263/comments","events_url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/263/events","html_url":"https://github.com/DataDog/dd-trace-js/pull/263","id":354463211,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMjE5NTQ4","number":263,"title":"add depth option to graphql plugin","user":{"login":"rochdev","id":1596303,"node_id":"MDQ6VXNlcjE1OTYzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/1596303?v=4","gravatar_id":"","url":"https://api.github.com/users/rochdev","html_url":"https://github.com/rochdev","followers_url":"https://api.github.com/users/rochdev/followers","following_url":"https://api.github.com/users/rochdev/following{/other_user}","gists_url":"https://api.github.com/users/rochdev/gists{/gist_id}","starred_url":"https://api.github.com/users/rochdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochdev/subscriptions","organizations_url":"https://api.github.com/users/rochdev/orgs","repos_url":"https://api.github.com/users/rochdev/repos","events_url":"https://api.github.com/users/rochdev/events{/privacy}","received_events_url":"https://api.github.com/users/rochdev/received_events","type":"User","site_admin":false},"labels":[{"id":807931152,"node_id":"MDU6TGFiZWw4MDc5MzExNTI=","url":"https://api.github.com/repos/DataDog/dd-trace-js/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":810199574,"node_id":"MDU6TGFiZWw4MTAxOTk1NzQ=","url":"https://api.github.com/repos/DataDog/dd-trace-js/labels/integrations","name":"integrations","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/DataDog/dd-trace-js/milestones/19","html_url":"https://github.com/DataDog/dd-trace-js/milestone/19","labels_url":"https://api.github.com/repos/DataDog/dd-trace-js/milestones/19/labels","id":3536212,"node_id":"MDk6TWlsZXN0b25lMzUzNjIxMg==","number":19,"title":"0.6.0","description":"","creator":{"login":"rochdev","id":1596303,"node_id":"MDQ6VXNlcjE1OTYzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/1596303?v=4","gravatar_id":"","url":"https://api.github.com/users/rochdev","html_url":"https://github.com/rochdev","followers_url":"https://api.github.com/users/rochdev/followers","following_url":"https://api.github.com/users/rochdev/following{/other_user}","gists_url":"https://api.github.com/users/rochdev/gists{/gist_id}","starred_url":"https://api.github.com/users/rochdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochdev/subscriptions","organizations_url":"https://api.github.com/users/rochdev/orgs","repos_url":"https://api.github.com/users/rochdev/repos","events_url":"https://api.github.com/users/rochdev/events{/privacy}","received_events_url":"https://api.github.com/users/rochdev/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2018-07-31T16:17:57Z","updated_at":"2018-08-27T20:31:57Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-08-27T20:19:44Z","updated_at":"2018-09-05T10:37:31Z","closed_at":"2018-08-27T20:31:57Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/DataDog/dd-trace-js/pulls/263","html_url":"https://github.com/DataDog/dd-trace-js/pull/263","diff_url":"https://github.com/DataDog/dd-trace-js/pull/263.diff","patch_url":"https://github.com/DataDog/dd-trace-js/pull/263.patch"},"body":"This PR adds a `depth` option to control how deep the fields/resolvers will be instrumented. In some cases the default can result in a lot of spans even though in reality all resolvers result in a single outgoing request. One good example of this is when using DataLoader which handles parallel queries in bulk. In that case having many individual spans for each resolver is unnecessary as they will all have the same duration.\r\n\r\nIt can also be helpful in cases where there are a lot of resolvers and the overhead of instrumentation is too high."},"comment":{"url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/comments/418683663","html_url":"https://github.com/DataDog/dd-trace-js/pull/263#issuecomment-418683663","issue_url":"https://api.github.com/repos/DataDog/dd-trace-js/issues/263","id":418683663,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODY4MzY2Mw==","user":{"login":"alloy","id":2320,"node_id":"MDQ6VXNlcjIzMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/2320?v=4","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T10:37:31Z","updated_at":"2018-09-05T10:37:31Z","author_association":"CONTRIBUTOR","body":"I’m a little confused about how this feature should be used. I see how in some cases (e.g. with DataLoader) many resolvers can all lead to the same batched request and how it would be helpful to remove that noise, but a depth limit approach seems a bit overboard for that situation as you could still have the same issue < the depth limit but then lose potentially interesting spans > the depth limit.\r\n\r\nIdeally, imo, we’d be able to collapse it in a way that would still retain the helpful bits, e.g.:\r\n\r\n```\r\n[graphql.query]\r\n  [graphql.field: artwork]\r\n    [graphql.resolve: artists]\r\n      (somehow reduce noise here)\r\n      [graphql.data-loader: keys:[banksy,andy-warhol]]\r\n        [http-client: /artists?ids=banksy,andy-warhol]\r\n```"}}
{"actor":{"display_login":"alloy"}}