def __init__(<EOL>self,<EOL>trace_id,<EOL>name,<EOL>parent_id,<EOL>span_id,<EOL>kind,<EOL>timestamp,<EOL>duration,<EOL>local_endpoint=None,<EOL>remote_endpoint=None,<EOL>debug=False,<EOL>shared=False,<EOL>annotations=None,<EOL>tags=None,<EOL>):
self.trace_id = trace_id<EOL>self.name = name<EOL>self.parent_id = parent_id<EOL>self.span_id = span_id<EOL>self.kind = kind<EOL>self.timestamp = timestamp<EOL>self.duration = duration<EOL>self.local_endpoint = local_endpoint<EOL>self.remote_endpoint = remote_endpoint<EOL>self.debug = debug<EOL>self.shared = shared<EOL>self.annotations = annotations or {}<EOL>self.tags = tags or {}<EOL>if not isinstance(kind, Kind):<EOL><INDENT>raise ZipkinError(<EOL>'<STR_LIT>'.format(kind))<EOL><DEDENT>if local_endpoint and not isinstance(local_endpoint, Endpoint):<EOL><INDENT>raise ZipkinError(<EOL>'<STR_LIT>')<EOL><DEDENT>if remote_endpoint and not isinstance(remote_endpoint, Endpoint):<EOL><INDENT>raise ZipkinError(<EOL>'<STR_LIT>')<EOL><DEDENT>
Creates a new Span.

        :param trace_id: Trace id.
        :type trace_id: str
        :param name: Name of the span.
        :type name: str
        :param parent_id: Parent span id.
        :type parent_id: str
        :param span_id: Span id.
        :type span_id: str
        :param kind: Span type (client, server, local, etc...)
        :type kind: Kind
        :param timestamp: start timestamp in seconds.
        :type timestamp: float
        :param duration: span duration in seconds.
        :type duration: float
        :param local_endpoint: the host that recorded this span.
        :type local_endpoint: Endpoint
        :param remote_endpoint: the remote service.
        :type remote_endpoint: Endpoint
        :param debug: True is a request to store this span even if it
            overrides sampling policy.
        :type debug: bool
        :param shared: True if we are contributing to a span started by
            another tracer (ex on a different host).
        :type shared: bool
        :param annotations: Optional dict of str -> timestamp annotations.
        :type annotations: dict
        :param tags: Optional dict of str -> str span tags.
        :type tags: dict