{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/547","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/547/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/547/events","html_url":"https://github.com/spring-cloud/spring-cloud-sleuth/issues/547","id":217222142,"number":547,"title":"Support adding baggage before newly created span is logged.","user":{"login":"aknrdureegaesr","id":1033352,"avatar_url":"https://avatars0.githubusercontent.com/u/1033352?v=3","gravatar_id":"","url":"https://api.github.com/users/aknrdureegaesr","html_url":"https://github.com/aknrdureegaesr","followers_url":"https://api.github.com/users/aknrdureegaesr/followers","following_url":"https://api.github.com/users/aknrdureegaesr/following{/other_user}","gists_url":"https://api.github.com/users/aknrdureegaesr/gists{/gist_id}","starred_url":"https://api.github.com/users/aknrdureegaesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aknrdureegaesr/subscriptions","organizations_url":"https://api.github.com/users/aknrdureegaesr/orgs","repos_url":"https://api.github.com/users/aknrdureegaesr/repos","events_url":"https://api.github.com/users/aknrdureegaesr/events{/privacy}","received_events_url":"https://api.github.com/users/aknrdureegaesr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-03-27T11:56:12Z","updated_at":"2017-04-05T10:51:01Z","closed_at":"2017-04-05T10:30:34Z","body":"I'm using `tracer.createSpan` and want to add baggage to the newly created span.\r\n\r\nI want that baggage to be available when the newly created span is handed over to my subclass of `Slf4jSpanLogger` for logging.\r\n\r\nThis is not well supported with the present API (we use 1.2.0M1). You get the new span only after it already has been logged. There seems to be no way to seed baggage."},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/comments/291824859","html_url":"https://github.com/spring-cloud/spring-cloud-sleuth/issues/547#issuecomment-291824859","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/547","id":291824859,"user":{"login":"aknrdureegaesr","id":1033352,"avatar_url":"https://avatars0.githubusercontent.com/u/1033352?v=3","gravatar_id":"","url":"https://api.github.com/users/aknrdureegaesr","html_url":"https://github.com/aknrdureegaesr","followers_url":"https://api.github.com/users/aknrdureegaesr/followers","following_url":"https://api.github.com/users/aknrdureegaesr/following{/other_user}","gists_url":"https://api.github.com/users/aknrdureegaesr/gists{/gist_id}","starred_url":"https://api.github.com/users/aknrdureegaesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aknrdureegaesr/subscriptions","organizations_url":"https://api.github.com/users/aknrdureegaesr/orgs","repos_url":"https://api.github.com/users/aknrdureegaesr/repos","events_url":"https://api.github.com/users/aknrdureegaesr/events{/privacy}","received_events_url":"https://api.github.com/users/aknrdureegaesr/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T10:51:01Z","updated_at":"2017-04-05T10:51:01Z","body":"My analysis:\r\n\r\nThe baggage feature opens up sleuth. By that feature, it can be used in environments where what the logging should look like cannot be governed by what spring cloud sleuth offers. You need to do two things: \r\n\r\n* Add baggage to the spans, containing the information your environment demands of you.\r\n* Implement your own loggers, that take advantage of that information.\r\n\r\nSo far the theory. That describes how it should be. In practice, however, as this discussion and my experience shows: If you seriously want to use the baggage feature, you have no problem with implementing your own logger subclasses.\r\n\r\nBut an interface to add baggage before your special-purpose loggers are called - does not exist.\r\n\r\nI thought I'm using the baggage feature exactly as it was intended to be used. I fail to see why using baggage and my own subclasses of `Slf4jSpanLogger` is hacky. I would like to receive your advice on that, @marcingrzejszczak .\r\n\r\nFor the time being, as I have not yet received such advice, my understanding is that using the baggage feature leads you straight into hacking. In other words, the baggage feature is not well-supported."}}
{"actor":{"display_login":"aknrdureegaesr"}}