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

Commit

Permalink
Include a cn annotation for all spans
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe committed Mar 16, 2016
1 parent 8832f24 commit 5ff6eaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,7 @@ Changes by Version
0.21.10 (unreleased)
--------------------

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


0.21.9 (2016-03-14)
Expand Down
9 changes: 7 additions & 2 deletions tchannel/zipkin/zipkin_trace.py
Expand Up @@ -82,8 +82,13 @@ def before_receive_request(self, request):
if not request.tracing.traceflags:
return

ann = annotation.server_recv()
request.tracing.annotations.append(ann)
request.tracing.annotations.append(annotation.server_recv())

caller_name = request.headers.get('cn')
if caller_name:
request.tracing.annotations.append(
annotation.string('cn', caller_name),
)

def after_send_response(self, response):
if not response.tracing.traceflags:
Expand Down

0 comments on commit 5ff6eaf

Please sign in to comment.