Slide 34
Slide 34 text
IstioͱTraces͕Ͳ͏࿈ܞ͢Δͷ͔?
ࣗಈతʹεύϯΛૹ৴Ͱ͖Δ
τϨʔεશମΛؔ࿈͚ͮΔ͜ͱͰ͖ͳ͍
ҎԼͷϔομΛࢠʹൖͤ͞Δ͜ͱͰؔ࿈͚ͮͰ͖Δ
• x-request-id
• x-b3-traceid
• x-b3-spanid
• x-b3-parentspanid
• x-b3-sampled
• x-b3-flags
• x-ot-span-context
def getForwardHeaders(request):
headers = {}
user_cookie = request.cookies.get("user")
if user_cookie:
headers['Cookie'] = 'user=' + user_cookie
incoming_headers = [ 'x-request-id',
'x-b3-traceid',
'x-b3-spanid',
'x-b3-parentspanid',
'x-b3-sampled',
'x-b3-flags',
'x-ot-span-context'
]
for ihdr in incoming_headers:
val = request.headers.get(ihdr)
if val is not None:
headers[ihdr] = val