{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/kayenta/pulls/comments/225218430","pull_request_review_id":164772341,"id":225218430,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTIxODQzMA==","diff_hunk":"@@ -0,0 +1,173 @@\n+/*\n+ * Copyright (c) 2018 Nike, inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\")\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ */\n+\n+package com.netflix.kayenta.signalfx.metrics;\n+\n+import com.google.common.collect.ImmutableList;\n+import com.netflix.kayenta.canary.CanaryConfig;\n+import com.netflix.kayenta.canary.CanaryMetricConfig;\n+import com.netflix.kayenta.canary.CanaryScope;\n+import com.netflix.kayenta.canary.providers.metrics.QueryPair;\n+import com.netflix.kayenta.canary.providers.metrics.SignalFxCanaryMetricSetQueryConfig;\n+import com.netflix.kayenta.metrics.MetricSet;\n+import com.netflix.kayenta.metrics.MetricsService;\n+import com.netflix.kayenta.security.AccountCredentialsRepository;\n+import com.netflix.kayenta.signalfx.canary.SignalFxCanaryScope;\n+import com.netflix.kayenta.signalfx.security.SignalFxNamedAccountCredentials;\n+import com.netflix.kayenta.signalfx.service.ErrorResponse;\n+import com.netflix.kayenta.signalfx.service.SignalFlowExecutionResult;\n+import com.netflix.kayenta.signalfx.service.SignalFxRequestError;\n+import com.netflix.kayenta.signalfx.service.SignalFxSignalFlowRemoteService;\n+import com.signalfx.signalflow.ChannelMessage;\n+import lombok.Builder;\n+import lombok.Getter;\n+import lombok.Singular;\n+import lombok.extern.slf4j.Slf4j;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import retrofit.RetrofitError;\n+\n+import javax.validation.constraints.NotNull;\n+import java.time.Duration;\n+import java.time.Instant;\n+import java.util.Collections;\n+import java.util.LinkedList;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Optional;\n+import java.util.stream.Collectors;\n+\n+import static com.signalfx.signalflow.ChannelMessage.Type.DATA_MESSAGE;\n+import static com.signalfx.signalflow.ChannelMessage.Type.ERROR_MESSAGE;\n+\n+@Builder\n+@Slf4j\n+public class SignalFxMetricsService implements MetricsService {","path":"kayenta-signalfx/src/main/java/com/netflix/kayenta/signalfx/metrics/SignalFxMetricsService.java","position":58,"original_position":58,"commit_id":"445fbd580e3f9f5e7faa60fa7de3e97a9d997b66","original_commit_id":"445fbd580e3f9f5e7faa60fa7de3e97a9d997b66","user":{"login":"fieldju","id":711726,"node_id":"MDQ6VXNlcjcxMTcyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/711726?v=4","gravatar_id":"","url":"https://api.github.com/users/fieldju","html_url":"https://github.com/fieldju","followers_url":"https://api.github.com/users/fieldju/followers","following_url":"https://api.github.com/users/fieldju/following{/other_user}","gists_url":"https://api.github.com/users/fieldju/gists{/gist_id}","starred_url":"https://api.github.com/users/fieldju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fieldju/subscriptions","organizations_url":"https://api.github.com/users/fieldju/orgs","repos_url":"https://api.github.com/users/fieldju/repos","events_url":"https://api.github.com/users/fieldju/events{/privacy}","received_events_url":"https://api.github.com/users/fieldju/received_events","type":"User","site_admin":false},"body":"I would like to do this in a new PR, let me bring it up with my leadership and get a ticket in the sprint.","created_at":"2018-10-15T15:48:32Z","updated_at":"2018-10-15T15:48:33Z","html_url":"https://github.com/spinnaker/kayenta/pull/385#discussion_r225218430","pull_request_url":"https://api.github.com/repos/spinnaker/kayenta/pulls/385","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/comments/225218430"},"html":{"href":"https://github.com/spinnaker/kayenta/pull/385#discussion_r225218430"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/385"}},"in_reply_to_id":225186435},"pull_request":{"url":"https://api.github.com/repos/spinnaker/kayenta/pulls/385","id":217084173,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MDg0MTcz","html_url":"https://github.com/spinnaker/kayenta/pull/385","diff_url":"https://github.com/spinnaker/kayenta/pull/385.diff","patch_url":"https://github.com/spinnaker/kayenta/pull/385.patch","issue_url":"https://api.github.com/repos/spinnaker/kayenta/issues/385","number":385,"state":"open","locked":false,"title":"feat(signalfx): Add SignalFx integration","user":{"login":"fieldju","id":711726,"node_id":"MDQ6VXNlcjcxMTcyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/711726?v=4","gravatar_id":"","url":"https://api.github.com/users/fieldju","html_url":"https://github.com/fieldju","followers_url":"https://api.github.com/users/fieldju/followers","following_url":"https://api.github.com/users/fieldju/following{/other_user}","gists_url":"https://api.github.com/users/fieldju/gists{/gist_id}","starred_url":"https://api.github.com/users/fieldju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fieldju/subscriptions","organizations_url":"https://api.github.com/users/fieldju/orgs","repos_url":"https://api.github.com/users/fieldju/repos","events_url":"https://api.github.com/users/fieldju/events{/privacy}","received_events_url":"https://api.github.com/users/fieldju/received_events","type":"User","site_admin":false},"body":"This pull request adds support for using [SignalFx](https://signalfx.com/) as a metric source.\r\n\r\nConfiguration and metric query conf can be found in the [README](https://github.com/Nike-Inc/kayenta/blob/feature/signalfx_metric_source/kayenta-signalfx/README.md)\r\n\r\n**Testing**\r\nI wrote an unit tests and an end to end integration test, that tests a Pass and Fail canary execution.\r\nThey can be ran via\r\n\r\n```bash\r\n./gradlew clean kayenta-signalfx:test kayenta-signalfx:integrationTest -Dkayenta.signalfx.apiKey=${SIGNALFX_API_TOKEN}\r\n```\r\n\r\nIf you would like to sanity check the integration test, I can get you an API Key.\r\n\r\nI tried my best to follow https://github.com/spinnaker/kayenta/pull/248 and in place patterns in the code base.","created_at":"2018-09-20T19:38:56Z","updated_at":"2018-10-15T15:48:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa46c63bd717983af403ec85dd61f1768410dbca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/kayenta/pulls/385/commits","review_comments_url":"https://api.github.com/repos/spinnaker/kayenta/pulls/385/comments","review_comment_url":"https://api.github.com/repos/spinnaker/kayenta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/kayenta/issues/385/comments","statuses_url":"https://api.github.com/repos/spinnaker/kayenta/statuses/445fbd580e3f9f5e7faa60fa7de3e97a9d997b66","head":{"label":"Nike-Inc:feature/signalfx_metric_source","ref":"feature/signalfx_metric_source","sha":"445fbd580e3f9f5e7faa60fa7de3e97a9d997b66","user":{"login":"Nike-Inc","id":1435711,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzU3MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1435711?v=4","gravatar_id":"","url":"https://api.github.com/users/Nike-Inc","html_url":"https://github.com/Nike-Inc","followers_url":"https://api.github.com/users/Nike-Inc/followers","following_url":"https://api.github.com/users/Nike-Inc/following{/other_user}","gists_url":"https://api.github.com/users/Nike-Inc/gists{/gist_id}","starred_url":"https://api.github.com/users/Nike-Inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nike-Inc/subscriptions","organizations_url":"https://api.github.com/users/Nike-Inc/orgs","repos_url":"https://api.github.com/users/Nike-Inc/repos","events_url":"https://api.github.com/users/Nike-Inc/events{/privacy}","received_events_url":"https://api.github.com/users/Nike-Inc/received_events","type":"Organization","site_admin":false},"repo":{"id":148255222,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgyNTUyMjI=","name":"kayenta","full_name":"Nike-Inc/kayenta","private":false,"owner":{"login":"Nike-Inc","id":1435711,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzU3MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1435711?v=4","gravatar_id":"","url":"https://api.github.com/users/Nike-Inc","html_url":"https://github.com/Nike-Inc","followers_url":"https://api.github.com/users/Nike-Inc/followers","following_url":"https://api.github.com/users/Nike-Inc/following{/other_user}","gists_url":"https://api.github.com/users/Nike-Inc/gists{/gist_id}","starred_url":"https://api.github.com/users/Nike-Inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nike-Inc/subscriptions","organizations_url":"https://api.github.com/users/Nike-Inc/orgs","repos_url":"https://api.github.com/users/Nike-Inc/repos","events_url":"https://api.github.com/users/Nike-Inc/events{/privacy}","received_events_url":"https://api.github.com/users/Nike-Inc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Nike-Inc/kayenta","description":"Automated Canary Service","fork":true,"url":"https://api.github.com/repos/Nike-Inc/kayenta","forks_url":"https://api.github.com/repos/Nike-Inc/kayenta/forks","keys_url":"https://api.github.com/repos/Nike-Inc/kayenta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nike-Inc/kayenta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nike-Inc/kayenta/teams","hooks_url":"https://api.github.com/repos/Nike-Inc/kayenta/hooks","issue_events_url":"https://api.github.com/repos/Nike-Inc/kayenta/issues/events{/number}","events_url":"https://api.github.com/repos/Nike-Inc/kayenta/events","assignees_url":"https://api.github.com/repos/Nike-Inc/kayenta/assignees{/user}","branches_url":"https://api.github.com/repos/Nike-Inc/kayenta/branches{/branch}","tags_url":"https://api.github.com/repos/Nike-Inc/kayenta/tags","blobs_url":"https://api.github.com/repos/Nike-Inc/kayenta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nike-Inc/kayenta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nike-Inc/kayenta/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nike-Inc/kayenta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nike-Inc/kayenta/statuses/{sha}","languages_url":"https://api.github.com/repos/Nike-Inc/kayenta/languages","stargazers_url":"https://api.github.com/repos/Nike-Inc/kayenta/stargazers","contributors_url":"https://api.github.com/repos/Nike-Inc/kayenta/contributors","subscribers_url":"https://api.github.com/repos/Nike-Inc/kayenta/subscribers","subscription_url":"https://api.github.com/repos/Nike-Inc/kayenta/subscription","commits_url":"https://api.github.com/repos/Nike-Inc/kayenta/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nike-Inc/kayenta/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nike-Inc/kayenta/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nike-Inc/kayenta/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nike-Inc/kayenta/contents/{+path}","compare_url":"https://api.github.com/repos/Nike-Inc/kayenta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nike-Inc/kayenta/merges","archive_url":"https://api.github.com/repos/Nike-Inc/kayenta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nike-Inc/kayenta/downloads","issues_url":"https://api.github.com/repos/Nike-Inc/kayenta/issues{/number}","pulls_url":"https://api.github.com/repos/Nike-Inc/kayenta/pulls{/number}","milestones_url":"https://api.github.com/repos/Nike-Inc/kayenta/milestones{/number}","notifications_url":"https://api.github.com/repos/Nike-Inc/kayenta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nike-Inc/kayenta/labels{/name}","releases_url":"https://api.github.com/repos/Nike-Inc/kayenta/releases{/id}","deployments_url":"https://api.github.com/repos/Nike-Inc/kayenta/deployments","created_at":"2018-09-11T03:30:40Z","updated_at":"2018-09-11T03:30:43Z","pushed_at":"2018-10-12T18:24:47Z","git_url":"git://github.com/Nike-Inc/kayenta.git","ssh_url":"git@github.com:Nike-Inc/kayenta.git","clone_url":"https://github.com/Nike-Inc/kayenta.git","svn_url":"https://github.com/Nike-Inc/kayenta","homepage":"","size":10175,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"6882c548e916a15fd5aa2a3a5677da97cbaf0be5","user":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":80229651,"node_id":"MDEwOlJlcG9zaXRvcnk4MDIyOTY1MQ==","name":"kayenta","full_name":"spinnaker/kayenta","private":false,"owner":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spinnaker/kayenta","description":"Automated Canary Service","fork":false,"url":"https://api.github.com/repos/spinnaker/kayenta","forks_url":"https://api.github.com/repos/spinnaker/kayenta/forks","keys_url":"https://api.github.com/repos/spinnaker/kayenta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/kayenta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/kayenta/teams","hooks_url":"https://api.github.com/repos/spinnaker/kayenta/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/kayenta/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/kayenta/events","assignees_url":"https://api.github.com/repos/spinnaker/kayenta/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/kayenta/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/kayenta/tags","blobs_url":"https://api.github.com/repos/spinnaker/kayenta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/kayenta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/kayenta/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/kayenta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/kayenta/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/kayenta/languages","stargazers_url":"https://api.github.com/repos/spinnaker/kayenta/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/kayenta/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/kayenta/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/kayenta/subscription","commits_url":"https://api.github.com/repos/spinnaker/kayenta/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/kayenta/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/kayenta/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/kayenta/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/kayenta/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/kayenta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/kayenta/merges","archive_url":"https://api.github.com/repos/spinnaker/kayenta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/kayenta/downloads","issues_url":"https://api.github.com/repos/spinnaker/kayenta/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/kayenta/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/kayenta/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/kayenta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/kayenta/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/kayenta/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/kayenta/deployments","created_at":"2017-01-27T17:30:07Z","updated_at":"2018-10-15T08:51:27Z","pushed_at":"2018-10-12T22:55:07Z","git_url":"git://github.com/spinnaker/kayenta.git","ssh_url":"git@github.com:spinnaker/kayenta.git","clone_url":"https://github.com/spinnaker/kayenta.git","svn_url":"https://github.com/spinnaker/kayenta","homepage":"","size":10099,"stargazers_count":735,"watchers_count":735,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":150,"open_issues":42,"watchers":735,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/385"},"html":{"href":"https://github.com/spinnaker/kayenta/pull/385"},"issue":{"href":"https://api.github.com/repos/spinnaker/kayenta/issues/385"},"comments":{"href":"https://api.github.com/repos/spinnaker/kayenta/issues/385/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/385/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/kayenta/pulls/385/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/kayenta/statuses/445fbd580e3f9f5e7faa60fa7de3e97a9d997b66"}},"author_association":"NONE"}}
{"actor":{"display_login":"fieldju"}}