def emit_spans(self):
<EOL>if self.firehose_handler:<EOL><INDENT>self._emit_spans_with_span_sender(<EOL>ZipkinBatchSender(self.firehose_handler,<EOL>self.max_span_batch_size,<EOL>self.encoder)<EOL>)<EOL><DEDENT>if not self.zipkin_attrs.is_sampled:<EOL><INDENT>self._get_tracer().clear()<EOL>return<EOL><DEDENT>span_sender = ZipkinBatchSender(self.transport_handler,<EOL>self.max_span_batch_size,<EOL>self.encoder)<EOL>self._emit_spans_with_span_sender(span_sender)<EOL>self._get_tracer().clear()<EOL>
Main function to log all the annotations stored during the entire
        request. This is done if the request is sampled and the response was
        a success. It also logs the service (`ss` and `sr`) or the client
        ('cs' and 'cr') annotations.