{"action":"created","comment":{"url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/comments/48822090","id":48822090,"diff_hunk":"@@ -122,6 +120,55 @@ public void EndServerTrace(Span serverSpan)\n                 {\n                     logger.Error(\"Error Ending Server Trace\", ex);\n                 }\n+        }\n+\n+        /// <summary>\n+        /// Records an annotation with the current timestamp and the provided value in the span.\n+        /// </summary>\n+        /// <param name=\"span\">The span where the annotation will be recorded.</param>\n+        /// <param name=\"value\">The value of the annotation to be recorded. If this parameter is omitted\n+        /// (or its value set to null), the method caller member name will be automatically passed.</param>\n+        public void Record(Span span, [CallerMemberName] string value = null)\n+        {\n+            if (!isTraceOn)\n+                return;\n+\n+            try\n+            {\n+                spanTracer.Record(span, value);\n+            }\n+            catch (Exception ex)\n+            {\n+                logger.Error(\"Error recording the annotation\", ex);\n+            }\n+        }\n+\n+        /// <summary>\n+        /// Records a key-value pair as a binary annotiation in the span.\n+        /// </summary>\n+        /// <typeparam name=\"T\">The type of the value to be recorded. See remarks for the currently supported types.</typeparam>\n+        /// <param name=\"span\">The span where the annotation will be recorded.</param>\n+        /// <param name=\"key\">The key which is a reference to the recorded value.</param>\n+        /// <param name=\"value\">The value of the annotation to be recorded.</param>\n+        /// <remarks>The RecordBinary will record a key-value pair which can be used to tag some additional information\n+        /// in the trace without any timestamps. The currently supported value types are <see cref=\"bool\"/>,\n+        /// <see cref=\"byte[]\"/>, <see cref=\"short\"/>, <see cref=\"int\"/>, <see cref=\"long\"/>, <see cref=\"double\"/> and\n+        /// <see cref=\"string\"/>. Any other types will be passed as string annotation types.\n+        /// \n+        /// Please note, that although the values have types, they will be recorded and sent by calling their\n+        /// respective ToString() method.</remarks>\n+        public void RecordBinary<T>(Span span, string key, T value)\n+        {\n+            if (!isTraceOn)\n+                return;\n+\n+            try\n+            {\n+                spanTracer.RecordBinary<T>(span, key, value);\n+            }\n+            catch (Exception ex)\n+            {\n+                logger.Error($\"Error recording a binary annotation (key: {key})\", ex);","path":"src/Medidata.ZipkinTracer.Core/ZipkinClient.cs","position":248,"original_position":161,"commit_id":"f3068e45969f5b6d21ebd6a72a763ed25fe09864","original_commit_id":"63ab087186083e539fbc160d92713bc51e7f9fa9","user":{"login":"kenyamat","id":7456149,"avatar_url":"https://avatars.githubusercontent.com/u/7456149?v=3","gravatar_id":"","url":"https://api.github.com/users/kenyamat","html_url":"https://github.com/kenyamat","followers_url":"https://api.github.com/users/kenyamat/followers","following_url":"https://api.github.com/users/kenyamat/following{/other_user}","gists_url":"https://api.github.com/users/kenyamat/gists{/gist_id}","starred_url":"https://api.github.com/users/kenyamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenyamat/subscriptions","organizations_url":"https://api.github.com/users/kenyamat/orgs","repos_url":"https://api.github.com/users/kenyamat/repos","events_url":"https://api.github.com/users/kenyamat/events{/privacy}","received_events_url":"https://api.github.com/users/kenyamat/received_events","type":"User","site_admin":false},"body":"Got it, thanks.","created_at":"2016-01-05T08:37:16Z","updated_at":"2016-01-05T08:37:16Z","html_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72#discussion_r48822090","pull_request_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/comments/48822090"},"html":{"href":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72#discussion_r48822090"},"pull_request":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72","id":55060831,"html_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72","diff_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72.diff","patch_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72.patch","issue_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/72","number":72,"state":"open","locked":false,"title":"[MCC-202655] Local Tracing for Arbitrary Events","user":{"login":"lschreck-mdsol","id":14884761,"avatar_url":"https://avatars.githubusercontent.com/u/14884761?v=3","gravatar_id":"","url":"https://api.github.com/users/lschreck-mdsol","html_url":"https://github.com/lschreck-mdsol","followers_url":"https://api.github.com/users/lschreck-mdsol/followers","following_url":"https://api.github.com/users/lschreck-mdsol/following{/other_user}","gists_url":"https://api.github.com/users/lschreck-mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/lschreck-mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lschreck-mdsol/subscriptions","organizations_url":"https://api.github.com/users/lschreck-mdsol/orgs","repos_url":"https://api.github.com/users/lschreck-mdsol/repos","events_url":"https://api.github.com/users/lschreck-mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/lschreck-mdsol/received_events","type":"User","site_admin":false},"body":"@bvillanueva-mdsol @kenyamat @jcarres-mdsol This PR implements a tracing mechanism for being able to trace local events related to a request.\r\n\r\nThe concept is the following:\r\n- The client creates a trace which will result an initialized Span\r\n- Calling the newly added ZipkinClient.Record method With the previously initialized span the client is able to save a custom annotation in the current span with the timestamp of the calling\r\n  - For a bonus if there is no value provided for the annotation, the tracer will record the caller method's name as the annotation value\r\n- Another option is to call the ZipkinClient.RecordBinary method which will add a binary annotation to the current span (this can be used to record some general information regarding the context and environment)\r\n\r\nPlease note that I used some new features of the C# 6.0 (e.g. null-conditional operator, interpolated strings etc.) therefore it is highly recommended to use Visual Studio 2015 for development and build purposes from now on.\r\n\r\nPlease review and merge it, then I will create and publish the NuGet package.\r\n\r\nfyi @cabbott @BPONTES @jfeltesse-mdsol ","created_at":"2016-01-05T07:09:03Z","updated_at":"2016-01-05T08:37:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f316825f6fc54432128f43b25a60131b94c24d66","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72/commits","review_comments_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72/comments","review_comment_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/72/comments","statuses_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/statuses/f3068e45969f5b6d21ebd6a72a763ed25fe09864","head":{"label":"mdsol:feature/LocalTracing","ref":"feature/LocalTracing","sha":"f3068e45969f5b6d21ebd6a72a763ed25fe09864","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":21194896,"name":"Medidata.ZipkinTracerModule","full_name":"mdsol/Medidata.ZipkinTracerModule","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule","description":"Zipkin Request Tracing for .Net Apps","fork":false,"url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule","forks_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/forks","keys_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/teams","hooks_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/hooks","issue_events_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/events","assignees_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/tags","blobs_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/languages","stargazers_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/stargazers","contributors_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/contributors","subscribers_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/subscribers","subscription_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/subscription","commits_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/merges","archive_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/downloads","issues_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/releases{/id}","created_at":"2014-06-25T07:55:02Z","updated_at":"2015-09-28T06:35:05Z","pushed_at":"2016-01-05T08:26:17Z","git_url":"git://github.com/mdsol/Medidata.ZipkinTracerModule.git","ssh_url":"git@github.com:mdsol/Medidata.ZipkinTracerModule.git","clone_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule.git","svn_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule","homepage":null,"size":1069,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"mdsol:develop","ref":"develop","sha":"528f294ba9078680f712743f99d78b028970b239","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":21194896,"name":"Medidata.ZipkinTracerModule","full_name":"mdsol/Medidata.ZipkinTracerModule","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule","description":"Zipkin Request Tracing for .Net Apps","fork":false,"url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule","forks_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/forks","keys_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/teams","hooks_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/hooks","issue_events_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/events","assignees_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/tags","blobs_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/languages","stargazers_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/stargazers","contributors_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/contributors","subscribers_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/subscribers","subscription_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/subscription","commits_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/merges","archive_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/downloads","issues_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/releases{/id}","created_at":"2014-06-25T07:55:02Z","updated_at":"2015-09-28T06:35:05Z","pushed_at":"2016-01-05T08:26:17Z","git_url":"git://github.com/mdsol/Medidata.ZipkinTracerModule.git","ssh_url":"git@github.com:mdsol/Medidata.ZipkinTracerModule.git","clone_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule.git","svn_url":"https://github.com/mdsol/Medidata.ZipkinTracerModule","homepage":null,"size":1069,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72"},"html":{"href":"https://github.com/mdsol/Medidata.ZipkinTracerModule/pull/72"},"issue":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/72"},"comments":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/mdsol/Medidata.ZipkinTracerModule/statuses/f3068e45969f5b6d21ebd6a72a763ed25fe09864"}}}}