def after_send_error(self, error): if not error.tracing.traceflags: return ann = annotation.server_send() error.tracing.annotations.append(ann) self.tracer.record([(error.tracing, error.tracing.annotations)])
def after_send_response(self, response): if not response.tracing.traceflags: return # send out a pair of annotations{server_recv, server_send} to zipkin ann = annotation.server_send() response.tracing.annotations.append(ann) self.tracer.record([(response.tracing, response.tracing.annotations)])