Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 5ff6eaf

Browse files
committed
Include a cn annotation for all spans
1 parent 8832f24 commit 5ff6eaf

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGES.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Changes by Version
44
0.21.10 (unreleased)
55
--------------------
66

7-
- Nothing changed yet.
7+
- Zipkin traces now include a server-side 'cn' annotation to identify callers.
88

99

1010
0.21.9 (2016-03-14)

tchannel/zipkin/zipkin_trace.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ def before_receive_request(self, request):
8282
if not request.tracing.traceflags:
8383
return
8484

85-
ann = annotation.server_recv()
86-
request.tracing.annotations.append(ann)
85+
request.tracing.annotations.append(annotation.server_recv())
86+
87+
caller_name = request.headers.get('cn')
88+
if caller_name:
89+
request.tracing.annotations.append(
90+
annotation.string('cn', caller_name),
91+
)
8792

8893
def after_send_response(self, response):
8994
if not response.tracing.traceflags:

0 commit comments

Comments
 (0)