{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/comments/216648937","pull_request_review_id":154176782,"id":216648937,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjY0ODkzNw==","diff_hunk":"@@ -130,30 +129,23 @@ class InvokerReactive(\n             s\"posted ${if (recovery) \"recovery\" else \"completion\"} of activation ${activationResult.activationId}\")\n       }\n     }\n-    // Potentially sends activation metadata to kafka if user events are enabled\n-    UserEvents.send(\n-      producer, {\n-        val activation = Activation(\n-          activationResult.namespace + EntityPath.PATHSEP + activationResult.name,\n-          activationResult.response.statusCode,\n-          activationResult.duration.getOrElse(0),\n-          activationResult.annotations.getAs[Long](WhiskActivation.waitTimeAnnotation).getOrElse(0),\n-          activationResult.annotations.getAs[Long](WhiskActivation.initTimeAnnotation).getOrElse(0),\n-          activationResult.annotations.getAs[String](WhiskActivation.kindAnnotation).getOrElse(\"unknown_kind\"),\n-          activationResult.annotations.getAs[Boolean](WhiskActivation.conductorAnnotation).getOrElse(false),\n-          activationResult.annotations\n-            .getAs[ActionLimits](WhiskActivation.limitsAnnotation)\n-            .map(al => al.memory.megabytes)\n-            .getOrElse(0),\n-          activationResult.annotations.getAs[Boolean](WhiskActivation.causedByAnnotation).getOrElse(false))\n+\n+    if (UserEvents.enabled) {\n+      val event = Activation.from(activationResult).map { body =>\n         EventMessage(\n           s\"invoker${instance.instance}\",\n-          activation,\n+          body,\n           activationResult.subject,\n           activationResult.namespace.toString,\n           userId,\n-          activation.typeName)\n-      })\n+          body.typeName)\n+      }\n+\n+      event match {\n+        case Success(msg) => UserEvents.send(producer, msg)\n+        case Failure(t)   => logging.warn(this, s\"activation event was not sent: $t\")","path":"core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala","position":null,"original_position":45,"commit_id":"a7b8a99fda19b9d31182b7f94a5194f3f4953432","original_commit_id":"ee6219cb87c80e6567ca4869b84a9c99cebcf79d","user":{"login":"markusthoemmes","id":1289147,"node_id":"MDQ6VXNlcjEyODkxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1289147?v=4","gravatar_id":"","url":"https://api.github.com/users/markusthoemmes","html_url":"https://github.com/markusthoemmes","followers_url":"https://api.github.com/users/markusthoemmes/followers","following_url":"https://api.github.com/users/markusthoemmes/following{/other_user}","gists_url":"https://api.github.com/users/markusthoemmes/gists{/gist_id}","starred_url":"https://api.github.com/users/markusthoemmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusthoemmes/subscriptions","organizations_url":"https://api.github.com/users/markusthoemmes/orgs","repos_url":"https://api.github.com/users/markusthoemmes/repos","events_url":"https://api.github.com/users/markusthoemmes/events{/privacy}","received_events_url":"https://api.github.com/users/markusthoemmes/received_events","type":"User","site_admin":false},"body":"Your wish has been granted.","created_at":"2018-09-11T12:26:34Z","updated_at":"2018-09-11T12:26:35Z","html_url":"https://github.com/apache/incubator-openwhisk/pull/4006#discussion_r216648937","pull_request_url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/comments/216648937"},"html":{"href":"https://github.com/apache/incubator-openwhisk/pull/4006#discussion_r216648937"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006"}},"in_reply_to_id":216636254},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006","id":213665521,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNjY1NTIx","html_url":"https://github.com/apache/incubator-openwhisk/pull/4006","diff_url":"https://github.com/apache/incubator-openwhisk/pull/4006.diff","patch_url":"https://github.com/apache/incubator-openwhisk/pull/4006.patch","issue_url":"https://api.github.com/repos/apache/incubator-openwhisk/issues/4006","number":4006,"state":"open","locked":false,"title":" Adjust activation metric schema to reflect reality.","user":{"login":"markusthoemmes","id":1289147,"node_id":"MDQ6VXNlcjEyODkxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1289147?v=4","gravatar_id":"","url":"https://api.github.com/users/markusthoemmes","html_url":"https://github.com/markusthoemmes","followers_url":"https://api.github.com/users/markusthoemmes/followers","following_url":"https://api.github.com/users/markusthoemmes/following{/other_user}","gists_url":"https://api.github.com/users/markusthoemmes/gists{/gist_id}","starred_url":"https://api.github.com/users/markusthoemmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusthoemmes/subscriptions","organizations_url":"https://api.github.com/users/markusthoemmes/orgs","repos_url":"https://api.github.com/users/markusthoemmes/repos","events_url":"https://api.github.com/users/markusthoemmes/events{/privacy}","received_events_url":"https://api.github.com/users/markusthoemmes/received_events","type":"User","site_admin":false},"body":"1. The `causedBy` annotation is actually an optional String vs. a boolean flag.\r\n2. The `name` field is actually intended to contain the fully-qualified name of the action vs. a composite of the invocation namespace and an action name (which doesn't really represent anything).\r\n\r\n## My changes affect the following components\r\n<!--- Select below all system components are affected by your change. -->\r\n<!--- Enter an `x` in all applicable boxes. -->\r\n- [X] Invoker\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->\r\n- [X] Enhancement or new feature (adds new functionality).\r\n\r\n## Checklist:\r\n<!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->\r\n\r\n- [X] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).\r\n- [X] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).\r\n- [X] I updated the documentation where necessary.\r\n\r\n","created_at":"2018-09-06T15:45:44Z","updated_at":"2018-09-11T12:26:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b221e8f4dba4b601063c715c72dec80fc0540e13","assignee":{"login":"vvraskin","id":7526585,"node_id":"MDQ6VXNlcjc1MjY1ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/7526585?v=4","gravatar_id":"","url":"https://api.github.com/users/vvraskin","html_url":"https://github.com/vvraskin","followers_url":"https://api.github.com/users/vvraskin/followers","following_url":"https://api.github.com/users/vvraskin/following{/other_user}","gists_url":"https://api.github.com/users/vvraskin/gists{/gist_id}","starred_url":"https://api.github.com/users/vvraskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvraskin/subscriptions","organizations_url":"https://api.github.com/users/vvraskin/orgs","repos_url":"https://api.github.com/users/vvraskin/repos","events_url":"https://api.github.com/users/vvraskin/events{/privacy}","received_events_url":"https://api.github.com/users/vvraskin/received_events","type":"User","site_admin":false},"assignees":[{"login":"vvraskin","id":7526585,"node_id":"MDQ6VXNlcjc1MjY1ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/7526585?v=4","gravatar_id":"","url":"https://api.github.com/users/vvraskin","html_url":"https://github.com/vvraskin","followers_url":"https://api.github.com/users/vvraskin/followers","following_url":"https://api.github.com/users/vvraskin/following{/other_user}","gists_url":"https://api.github.com/users/vvraskin/gists{/gist_id}","starred_url":"https://api.github.com/users/vvraskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvraskin/subscriptions","organizations_url":"https://api.github.com/users/vvraskin/orgs","repos_url":"https://api.github.com/users/vvraskin/repos","events_url":"https://api.github.com/users/vvraskin/events{/privacy}","received_events_url":"https://api.github.com/users/vvraskin/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":373821005,"node_id":"MDU6TGFiZWwzNzM4MjEwMDU=","url":"https://api.github.com/repos/apache/incubator-openwhisk/labels/monitoring","name":"monitoring","color":"e99695","default":false},{"id":401833916,"node_id":"MDU6TGFiZWw0MDE4MzM5MTY=","url":"https://api.github.com/repos/apache/incubator-openwhisk/labels/review","name":"review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-openwhisk/issues/4006/comments","statuses_url":"https://api.github.com/repos/apache/incubator-openwhisk/statuses/a7b8a99fda19b9d31182b7f94a5194f3f4953432","head":{"label":"markusthoemmes:aggregator","ref":"aggregator","sha":"a7b8a99fda19b9d31182b7f94a5194f3f4953432","user":{"login":"markusthoemmes","id":1289147,"node_id":"MDQ6VXNlcjEyODkxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1289147?v=4","gravatar_id":"","url":"https://api.github.com/users/markusthoemmes","html_url":"https://github.com/markusthoemmes","followers_url":"https://api.github.com/users/markusthoemmes/followers","following_url":"https://api.github.com/users/markusthoemmes/following{/other_user}","gists_url":"https://api.github.com/users/markusthoemmes/gists{/gist_id}","starred_url":"https://api.github.com/users/markusthoemmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusthoemmes/subscriptions","organizations_url":"https://api.github.com/users/markusthoemmes/orgs","repos_url":"https://api.github.com/users/markusthoemmes/repos","events_url":"https://api.github.com/users/markusthoemmes/events{/privacy}","received_events_url":"https://api.github.com/users/markusthoemmes/received_events","type":"User","site_admin":false},"repo":{"id":52289393,"node_id":"MDEwOlJlcG9zaXRvcnk1MjI4OTM5Mw==","name":"openwhisk","full_name":"markusthoemmes/openwhisk","owner":{"login":"markusthoemmes","id":1289147,"node_id":"MDQ6VXNlcjEyODkxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1289147?v=4","gravatar_id":"","url":"https://api.github.com/users/markusthoemmes","html_url":"https://github.com/markusthoemmes","followers_url":"https://api.github.com/users/markusthoemmes/followers","following_url":"https://api.github.com/users/markusthoemmes/following{/other_user}","gists_url":"https://api.github.com/users/markusthoemmes/gists{/gist_id}","starred_url":"https://api.github.com/users/markusthoemmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markusthoemmes/subscriptions","organizations_url":"https://api.github.com/users/markusthoemmes/orgs","repos_url":"https://api.github.com/users/markusthoemmes/repos","events_url":"https://api.github.com/users/markusthoemmes/events{/privacy}","received_events_url":"https://api.github.com/users/markusthoemmes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markusthoemmes/openwhisk","description":"OpenWhisk is a cloud-first distributed event-based programming service.","fork":true,"url":"https://api.github.com/repos/markusthoemmes/openwhisk","forks_url":"https://api.github.com/repos/markusthoemmes/openwhisk/forks","keys_url":"https://api.github.com/repos/markusthoemmes/openwhisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markusthoemmes/openwhisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markusthoemmes/openwhisk/teams","hooks_url":"https://api.github.com/repos/markusthoemmes/openwhisk/hooks","issue_events_url":"https://api.github.com/repos/markusthoemmes/openwhisk/issues/events{/number}","events_url":"https://api.github.com/repos/markusthoemmes/openwhisk/events","assignees_url":"https://api.github.com/repos/markusthoemmes/openwhisk/assignees{/user}","branches_url":"https://api.github.com/repos/markusthoemmes/openwhisk/branches{/branch}","tags_url":"https://api.github.com/repos/markusthoemmes/openwhisk/tags","blobs_url":"https://api.github.com/repos/markusthoemmes/openwhisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markusthoemmes/openwhisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markusthoemmes/openwhisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/markusthoemmes/openwhisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markusthoemmes/openwhisk/statuses/{sha}","languages_url":"https://api.github.com/repos/markusthoemmes/openwhisk/languages","stargazers_url":"https://api.github.com/repos/markusthoemmes/openwhisk/stargazers","contributors_url":"https://api.github.com/repos/markusthoemmes/openwhisk/contributors","subscribers_url":"https://api.github.com/repos/markusthoemmes/openwhisk/subscribers","subscription_url":"https://api.github.com/repos/markusthoemmes/openwhisk/subscription","commits_url":"https://api.github.com/repos/markusthoemmes/openwhisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/markusthoemmes/openwhisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/markusthoemmes/openwhisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/markusthoemmes/openwhisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/markusthoemmes/openwhisk/contents/{+path}","compare_url":"https://api.github.com/repos/markusthoemmes/openwhisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markusthoemmes/openwhisk/merges","archive_url":"https://api.github.com/repos/markusthoemmes/openwhisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markusthoemmes/openwhisk/downloads","issues_url":"https://api.github.com/repos/markusthoemmes/openwhisk/issues{/number}","pulls_url":"https://api.github.com/repos/markusthoemmes/openwhisk/pulls{/number}","milestones_url":"https://api.github.com/repos/markusthoemmes/openwhisk/milestones{/number}","notifications_url":"https://api.github.com/repos/markusthoemmes/openwhisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markusthoemmes/openwhisk/labels{/name}","releases_url":"https://api.github.com/repos/markusthoemmes/openwhisk/releases{/id}","deployments_url":"https://api.github.com/repos/markusthoemmes/openwhisk/deployments","created_at":"2016-02-22T16:57:43Z","updated_at":"2018-09-06T15:38:00Z","pushed_at":"2018-09-11T12:26:21Z","git_url":"git://github.com/markusthoemmes/openwhisk.git","ssh_url":"git@github.com:markusthoemmes/openwhisk.git","clone_url":"https://github.com/markusthoemmes/openwhisk.git","svn_url":"https://github.com/markusthoemmes/openwhisk","homepage":"","size":62829,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"569b51b819ebc513d35ff3c139f4c47764d765bf","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":52039373,"node_id":"MDEwOlJlcG9zaXRvcnk1MjAzOTM3Mw==","name":"incubator-openwhisk","full_name":"apache/incubator-openwhisk","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-openwhisk","description":"Apache OpenWhisk is a serverless event-based programming service and an Apache Incubator project.","fork":false,"url":"https://api.github.com/repos/apache/incubator-openwhisk","forks_url":"https://api.github.com/repos/apache/incubator-openwhisk/forks","keys_url":"https://api.github.com/repos/apache/incubator-openwhisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-openwhisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-openwhisk/teams","hooks_url":"https://api.github.com/repos/apache/incubator-openwhisk/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-openwhisk/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-openwhisk/events","assignees_url":"https://api.github.com/repos/apache/incubator-openwhisk/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-openwhisk/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-openwhisk/tags","blobs_url":"https://api.github.com/repos/apache/incubator-openwhisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-openwhisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-openwhisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-openwhisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-openwhisk/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-openwhisk/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-openwhisk/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-openwhisk/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-openwhisk/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-openwhisk/subscription","commits_url":"https://api.github.com/repos/apache/incubator-openwhisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-openwhisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-openwhisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-openwhisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-openwhisk/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-openwhisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-openwhisk/merges","archive_url":"https://api.github.com/repos/apache/incubator-openwhisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-openwhisk/downloads","issues_url":"https://api.github.com/repos/apache/incubator-openwhisk/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-openwhisk/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-openwhisk/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-openwhisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-openwhisk/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-openwhisk/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-openwhisk/deployments","created_at":"2016-02-18T21:16:19Z","updated_at":"2018-09-11T09:50:23Z","pushed_at":"2018-09-11T12:26:23Z","git_url":"git://github.com/apache/incubator-openwhisk.git","ssh_url":"git@github.com:apache/incubator-openwhisk.git","clone_url":"https://github.com/apache/incubator-openwhisk.git","svn_url":"https://github.com/apache/incubator-openwhisk","homepage":"http://openwhisk.org","size":62673,"stargazers_count":3477,"watchers_count":3477,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":654,"mirror_url":null,"archived":false,"open_issues_count":425,"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":654,"open_issues":425,"watchers":3477,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006"},"html":{"href":"https://github.com/apache/incubator-openwhisk/pull/4006"},"issue":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/issues/4006"},"comments":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/issues/4006/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/pulls/4006/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-openwhisk/statuses/a7b8a99fda19b9d31182b7f94a5194f3f4953432"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"markusthoemmes"}}