def after_receive_error(self, request, error): if not error.tracing.traceflags: return ann = annotation.client_recv() error.tracing.annotations.append(ann) self.tracer.record([(error.tracing, error.tracing.annotations)])
def after_receive_response(self, request, response): if not response.tracing.traceflags: return # send out a pair of annotations{client_recv, client_send} to zipkin ann = annotation.client_recv() response.tracing.annotations.append(ann) self.tracer.record([(response.tracing, response.tracing.annotations)])