{"action":"closed","issue":{"url":"https://api.github.com/repos/w3c/distributed-tracing/issues/137","repository_url":"https://api.github.com/repos/w3c/distributed-tracing","labels_url":"https://api.github.com/repos/w3c/distributed-tracing/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/w3c/distributed-tracing/issues/137/comments","events_url":"https://api.github.com/repos/w3c/distributed-tracing/issues/137/events","html_url":"https://github.com/w3c/distributed-tracing/issues/137","id":345180647,"node_id":"MDU6SXNzdWUzNDUxODA2NDc=","number":137,"title":"Allow multiple tracestate entries for one vendor","user":{"login":"discostu105","id":10918780,"node_id":"MDQ6VXNlcjEwOTE4Nzgw","avatar_url":"https://avatars0.githubusercontent.com/u/10918780?v=4","gravatar_id":"","url":"https://api.github.com/users/discostu105","html_url":"https://github.com/discostu105","followers_url":"https://api.github.com/users/discostu105/followers","following_url":"https://api.github.com/users/discostu105/following{/other_user}","gists_url":"https://api.github.com/users/discostu105/gists{/gist_id}","starred_url":"https://api.github.com/users/discostu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discostu105/subscriptions","organizations_url":"https://api.github.com/users/discostu105/orgs","repos_url":"https://api.github.com/users/discostu105/repos","events_url":"https://api.github.com/users/discostu105/events{/privacy}","received_events_url":"https://api.github.com/users/discostu105/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/w3c/distributed-tracing/milestones/4","html_url":"https://github.com/w3c/distributed-tracing/milestone/4","labels_url":"https://api.github.com/repos/w3c/distributed-tracing/milestones/4/labels","id":3266972,"node_id":"MDk6TWlsZXN0b25lMzI2Njk3Mg==","number":4,"title":"3. FPWD","description":"Resolve before creating a First Public [Working Draft](https://www.w3.org/2017/Process-20170301/#working-draft).","creator":{"login":"SergeyKanzhelev","id":9950081,"node_id":"MDQ6VXNlcjk5NTAwODE=","avatar_url":"https://avatars2.githubusercontent.com/u/9950081?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeyKanzhelev","html_url":"https://github.com/SergeyKanzhelev","followers_url":"https://api.github.com/users/SergeyKanzhelev/followers","following_url":"https://api.github.com/users/SergeyKanzhelev/following{/other_user}","gists_url":"https://api.github.com/users/SergeyKanzhelev/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeyKanzhelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeyKanzhelev/subscriptions","organizations_url":"https://api.github.com/users/SergeyKanzhelev/orgs","repos_url":"https://api.github.com/users/SergeyKanzhelev/repos","events_url":"https://api.github.com/users/SergeyKanzhelev/events{/privacy}","received_events_url":"https://api.github.com/users/SergeyKanzhelev/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2018-04-14T06:20:53Z","updated_at":"2018-08-09T21:34:29Z","due_on":"2018-08-31T07:00:00Z","closed_at":null},"comments":15,"created_at":"2018-07-27T10:48:20Z","updated_at":"2018-08-09T21:34:29Z","closed_at":"2018-08-09T21:34:29Z","author_association":"NONE","body":"__Use Case__\r\n\r\nMulti-tenant tracing.\r\n\r\nCurrenty TraceContext elegantly solves the problem of different tracing system that interact with each other. Via _tracestate_, \"foreign\" vendor information is transported throughout the trace. This is great, but a system traced only by one vendor can have a similiar problem. If services are monitored by different tenants/customers of that vendor, the trace breaks (assuming the vendor is relying on _tracestate_ information).\r\n\r\n__Concrete example__\r\nA 3-tier trace where the first and the last tier are monitored by the same tenant (A), but the in-between tier is monitored by a different tenant (B), but both use the same APM vendor.\r\n\r\n(A) -> (B) -> (A)\r\n```\r\n1. tracestate=\"vendor1=tenant:0xaaa;importantData:0xfff\"\r\n2. tracestate=\"vendor1=tenant:0xbbb;importantData:0xeee\"\r\n3. tracestate=\"vendor1=tenant:0xaaa;importantData:0xccc\"  // trace for tenant A is broken\r\n```\r\n\r\nSince, with current design, a vendor can only use one key in _tracestate_, the trace would break.\r\n\r\n__Possible Solutions__\r\n\r\n 1. Vendor needs to encode multi-tenant support into a single _tracestate_ entry.\r\n```\r\n1. tracestate=\"vendor1=(tenant:0xaaa;importantData:0xfff)\"\r\n2. tracestate=\"vendor1=(tenant:0xbbb;importantData:0xeee)|(tenant:0xaaa;importantData:0xfff)\"\r\n3. tracestate=\"vendor1=(tenant:0xaaa;importantData:0xfff)|(tenant:0xbbb;importantData:0xeee)\"\r\n```\r\n\r\n 2. Vendor is allowed to have multipe _tracestate_ enties with the same key.\r\n```\r\n1. tracestate=\"vendor1=tenant:0xaaa;importantData:0xfff\"\r\n2. tracestate=\"vendor1=tenant:0xbbb;importantData:0xeee, vendor1=tenant:0xaaa;importantData:0xfff\"\r\n3. tracestate=\"vendor1=tenant:0xaaa;importantData:0xfff, vendor1=tenant:0xbbb;importantData:0xeee\"\r\n```\r\n\r\n 3. Vendor is allowed to encode dynamic info into the _tracestate_ key.\r\n```\r\n1. tracestate=\"vendor1-0xaaa=importantData:0xfff\"\r\n2. tracestate=\"vendor1-0xbbb=importantData:0xeee, vendor1-0xaaa=importantData:0xfff\"\r\n3. tracestate=\"vendor1-0xaaa=importantData:0xfff, vendor1-0xbbb=importantData:0xeee\"\r\n```\r\n\r\n__Thoughts__\r\n\r\n * Solution 1 would not need any change to the current _tracestate_ spec. But it would require every vendor to solve a problem, that is pretty much elegantly solved already with tracestate (for multi-vendors).\r\n * Solution 2: The current spec says \"only one entry per key\". This would need to be changed. It might have implications on the data-type we use for the HTTP-header. It also bears the risk of implementations doing this wrong (Map instead of MultiMap). \r\n * Solution 3: Could be a legit solution. We'd need to define if keys can be arbitraty, or if there is still a defined format (`<vendor>-<dynamicdata>`) where `<vendor>` should still be a registered name (https://github.com/w3c/distributed-tracing/issues/58).\r\n\r\nThere's been an issue by @SergeyKanzhelev , which I believe might overlap with this and maybe serves the same use-case: https://github.com/w3c/distributed-tracing/issues/117.\r\n"}}
{"actor":{"display_login":"SergeyKanzhelev"}}