{"action":"created","issue":{"url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/35","repository_url":"https://api.github.com/repos/beam-telemetry/telemetry","labels_url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/35/comments","events_url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/35/events","html_url":"https://github.com/beam-telemetry/telemetry/issues/35","id":394934465,"node_id":"MDU6SXNzdWUzOTQ5MzQ0NjU=","number":35,"title":"Expected user experience for installing a telemetry backend","user":{"login":"binaryseed","id":39946,"node_id":"MDQ6VXNlcjM5OTQ2","avatar_url":"https://avatars1.githubusercontent.com/u/39946?v=4","gravatar_id":"","url":"https://api.github.com/users/binaryseed","html_url":"https://github.com/binaryseed","followers_url":"https://api.github.com/users/binaryseed/followers","following_url":"https://api.github.com/users/binaryseed/following{/other_user}","gists_url":"https://api.github.com/users/binaryseed/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryseed/subscriptions","organizations_url":"https://api.github.com/users/binaryseed/orgs","repos_url":"https://api.github.com/users/binaryseed/repos","events_url":"https://api.github.com/users/binaryseed/events{/privacy}","received_events_url":"https://api.github.com/users/binaryseed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-12-31T06:11:52Z","updated_at":"2018-12-31T17:58:14Z","closed_at":null,"author_association":"NONE","body":"I'm working on an instrumentation package for sending Ecto data to New Relic (https://github.com/binaryseed/new_relic_ecto). I'm the author of New Relic's Elixir agent (https://github.com/newrelic/elixir_agent/)\r\n\r\nI'm wondering what the expected workflow is for users who would want to install the package.\r\n\r\nFor example, in this case, I'm wondering about the following:\r\n\r\n* Should I get clever and figure out the existing Repos at startup and auto-instrument them, or should I require the user to manually attach the handler. \r\n\r\nIf I knew the `otp_app` I could get the list of Repos & attach them. But generally do we want users to have to glue things together or should we try to make it as automatic as possible?\r\n\r\n* Should I provide a helper function for doing the `attach`, or do we want users interacting with `:telemetry.attach` directly?\r\n\r\nRight now I'm thinking of at least providing a helper that translates from the Repo module to the Telemetry event for the user, and wraps up the details of how my handler is implemented. Here's how that is currently shaping up: https://github.com/binaryseed/new_relic_ecto/pull/4\r\n\r\n```elixir\r\ndef attach(repo: repo) do\r\n  Telemetry.attach(\r\n    \"new_relic_ecto\",\r\n    telemetry_prefix(repo) ++ [:query],\r\n    NewRelic.Ecto.Telemetry,\r\n    :handle_event,\r\n    %{}\r\n  )\r\nend\r\n```\r\n\r\nJust hoping to get a sense of the desired user experience... Thanks!"},"comment":{"url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/comments/450674971","html_url":"https://github.com/beam-telemetry/telemetry/issues/35#issuecomment-450674971","issue_url":"https://api.github.com/repos/beam-telemetry/telemetry/issues/35","id":450674971,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY3NDk3MQ==","user":{"login":"josevalim","id":9582,"node_id":"MDQ6VXNlcjk1ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/9582?v=4","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T17:58:14Z","updated_at":"2018-12-31T17:58:14Z","author_association":"CONTRIBUTOR","body":"I do have some concerns because starting handlers when telemetry starts may\ncause some handlers to be invoked before the application that defines the\nhandler is started.\n\nTheoretically you should always depend on the things that are emitting\nevents but that is not required since we are performing dynamic dispatching.\n\nFurthermore, any application can provide the functionality you propose, so\nI would rather keep telemetry core small, which is the original goal. :)\n-- \n\n\n*José Valimwww.plataformatec.com.br\n<http://www.plataformatec.com.br/>Founder and Director of R&D*\n"}}
{"actor":{"display_login":"josevalim"}}