{"action":"created","issue":{"url":"https://api.github.com/repos/reddit/baseplate/issues/86","repository_url":"https://api.github.com/repos/reddit/baseplate","labels_url":"https://api.github.com/repos/reddit/baseplate/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/reddit/baseplate/issues/86/comments","events_url":"https://api.github.com/repos/reddit/baseplate/issues/86/events","html_url":"https://github.com/reddit/baseplate/pull/86","id":225212657,"number":86,"title":"Tracing configuration consolidation","user":{"login":"spladug","id":338853,"avatar_url":"https://avatars3.githubusercontent.com/u/338853?v=3","gravatar_id":"","url":"https://api.github.com/users/spladug","html_url":"https://github.com/spladug","followers_url":"https://api.github.com/users/spladug/followers","following_url":"https://api.github.com/users/spladug/following{/other_user}","gists_url":"https://api.github.com/users/spladug/gists{/gist_id}","starred_url":"https://api.github.com/users/spladug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spladug/subscriptions","organizations_url":"https://api.github.com/users/spladug/orgs","repos_url":"https://api.github.com/users/spladug/repos","events_url":"https://api.github.com/users/spladug/events{/privacy}","received_events_url":"https://api.github.com/users/spladug/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-28T23:05:18Z","updated_at":"2017-05-08T17:41:18Z","closed_at":"2017-05-08T17:41:18Z","pull_request":{"url":"https://api.github.com/repos/reddit/baseplate/pulls/86","html_url":"https://github.com/reddit/baseplate/pull/86","diff_url":"https://github.com/reddit/baseplate/pull/86.diff","patch_url":"https://github.com/reddit/baseplate/pull/86.patch"},"body":"This changes the tracing configuration to be more like the metrics client and various client library integrations. This should cover IO-1629 as brought up in #79. The way this is done does not require flag-day transition from users of baseplate, but they'll instead start getting a deprecation warning.\r\n\r\nOld style application code:\r\n\r\n```python\r\ncfg = parse_config(app_config, {\r\n    \"tracing\": {\r\n        \"service_name\": config.String,\r\n        \"tracing_endpoint\": config.Optional(config.Endpoint),\r\n        \"sample_rate\": config.Optional(config.Float, default=0.1),\r\n    },\r\n})\r\n\r\n...\r\n\r\nbaseplate.configure_tracing(\r\n    cfg.tracing.service_name,\r\n    cfg.tracing.tracing_endpoint,\r\n    sample_rate=cfg.tracing.sample_rate,\r\n)\r\n```\r\n\r\nNew style application code:\r\n\r\n```python\r\ntracing_client = make_tracing_client(app_config)\r\n\r\n...\r\n\r\nbaseplate.configure_tracing(tracing_client)\r\n```\r\n\r\nI also took the opportunity to (backwards compatibly) move sampling to the Percentage style and allow all the other config options through from config too.\r\n\r\n(Sorry, @ckwang8128, I know you had this ticket but I had a few minutes at the tail end of snoo's day and was trying to fix up issues with the cookiecutter (see: https://github.com/reddit/baseplate-cookiecutter/issues/18) that came up recently)"},"comment":{"url":"https://api.github.com/repos/reddit/baseplate/issues/comments/299937005","html_url":"https://github.com/reddit/baseplate/pull/86#issuecomment-299937005","issue_url":"https://api.github.com/repos/reddit/baseplate/issues/86","id":299937005,"user":{"login":"spladug","id":338853,"avatar_url":"https://avatars3.githubusercontent.com/u/338853?v=3","gravatar_id":"","url":"https://api.github.com/users/spladug","html_url":"https://github.com/spladug","followers_url":"https://api.github.com/users/spladug/followers","following_url":"https://api.github.com/users/spladug/following{/other_user}","gists_url":"https://api.github.com/users/spladug/gists{/gist_id}","starred_url":"https://api.github.com/users/spladug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spladug/subscriptions","organizations_url":"https://api.github.com/users/spladug/orgs","repos_url":"https://api.github.com/users/spladug/repos","events_url":"https://api.github.com/users/spladug/events{/privacy}","received_events_url":"https://api.github.com/users/spladug/received_events","type":"User","site_admin":false},"created_at":"2017-05-08T17:41:18Z","updated_at":"2017-05-08T17:41:18Z","body":"99f5a609f007bbedac71cd280b229314633d6584...5ee9abbca69170bfda83a58dc613a97d9186f21f"}}
{"actor":{"display_login":"spladug"}}