Module ImportFrom alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Dict Str Str Str NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Return NameLoad decorator_list
N/A __future__ absolute_import N/A re Span N/A object N/A N/A 
    Span represents a unit of work executed on behalf of a trace. Examples of
    spans include a remote procedure call, or a in-process method call to a
    sub-component. A trace is required to have a single, top level "root"
    span, and zero or more children spans, which in turns can have their own
    children spans, thus forming a tree structure.

    Span implements a Context Manager API that allows the following usage:

    .. code-block:: python

        span = tracer.start_span(operation_name='go_fishing')
        with span:
            call_some_service()

    In this case it's not necessary to call span.finish()
     __init__ N/A N/A self tracer N/A N/A N/A N/A self _tracer tracer N/A set_operation_name N/A N/A self operation_name N/A N/A N/A Sets or changes the operation name.

        :param operation_name: the new operation name
        :return: Returns the Span itself, for call chaining.
         N/A self N/A finish N/A N/A self finish_time N/A None N/A N/A Indicates that the work represented by this span has been completed
        or terminated, and is ready to be sent to the Reporter.

        If any tags / logs need to be added to the span, it should be done
        before calling finish(), otherwise they may be ignored.

        :param finish_time: an explicit Span finish timestamp as a unix
            timestamp per time.time()
         N/A N/A set_tag N/A N/A self key value N/A N/A N/A Attaches a key/value pair to the span.

        The set of supported value types is implementation specific. It is the
        responsibility of the actual tracing system to know how to serialize
        and record the values.

        If the user calls set_tag multiple times for the same key,
        the behavior of the tracer is undefined, i.e. it is implementation
        specific whether the tracer will retain the first value, or the last
        value, or pick one randomly, or even keep all of them.

        :param key: key or name of the tag. Must be a string.
        :param value: value of the tag.

        :return: Returns the Span itself, for call chaining.
        :rtype: Span
         N/A self N/A log_event N/A N/A self event payload N/A None N/A N/A Logs an event against the span, with the current timestamp.

        :param event: an event name as a string
        :param payload: an arbitrary structured payload. Implementations may
            choose to ignore none, some, or all of the payload.
        :return: returns the span itself, for chaining the calls
         N/A self N/A log N/A N/A self N/A kwargs N/A N/A Records a generic Log event at an arbitrary timestamp.

        :param timestamp: the log timestamp as a unix timestamp per time.time()
        :param event: an event name as a string
        :param payload: an arbitrary structured payload. Implementations may
            choose to ignore none, some, or all of the payload.
        :return: returns the span itself, for chaining the calls
         N/A self N/A set_baggage_item N/A N/A self key value N/A N/A N/A Stores a Baggage item in the span as a key/value pair.

        Enables powerful distributed context propagation functionality where
        arbitrary application data can be carried along the full path of
        request execution throughout the system.

        Note 1: Baggage is only propagated to the future (recursive) children
        of this Span.

        Note 2: Baggage is sent in-band with every subsequent local and remote
        calls, so this feature must be used with care.

        Note 3: keys are case-insensitive, to allow propagation via HTTP
        headers. Keys must match regexp `(?i:[a-z0-9][-a-z0-9]*)`. See
        `canonicalize_baggage_key()` for a way of checking and canonicalizing
        a key. If a key doesn't meet these guidelines, the behavior of
        `set_baggage_item()` will be undefined.

        :param key: Baggage item key
        :type key: str

        :param value: Baggage item value
        :type value: str

        :rtype : Span
        :return: itself, for chaining the calls.
         N/A self N/A get_baggage_item N/A N/A self key N/A N/A N/A Retrieves value of the Baggage item with the given key.

        Key is case-insensitive.

        :param key: key of the Baggage item
        :type key: str

        :rtype : str
        :return: value of the Baggage item with given key, or None.
         N/A None N/A tracer N/A N/A self N/A N/A N/A Provides access to the Tracer that created this Span.

        :return: returns the Tracer that created this Span.
         N/A N/A self _tracer N/A property __enter__ N/A N/A self N/A N/A N/A Invoked when span is used as a context manager.

        :return: returns the Span itself
         N/A self N/A __exit__ N/A N/A self exc_type exc_val exc_tb N/A N/A N/A Ends context manager and calls finish() on the span.

        If exception has occurred during execution, it is automatically added
        as a tag to the span.
         N/A exc_type N/A N/A N/A N/A self log_event python.exception N/A type val tb exc_type exc_val exc_tb N/A N/A N/A self finish N/A N/A start_child_span N/A N/A parent_span operation_name tags start_time N/A None None N/A N/A A shorthand method that starts a child span given a parent span.

    Equivalent to calling

        parent_span.tracer().start_span(operation_name, parent_span, ...)

    :param parent_span: the Span which will act as the parent of the returned
        child Span instance
    :param operation_name: the operation name for the child Span instance
    :param tags: optional dict of Span Tags. The caller gives up ownership of
        that dict, because the Tracer may use it as-is to avoid extra data
        copying.
    :param start_time: an explicit Span start time as a unix timestamp per
        time.time().

    :return: Returns an already-started Span instance.
     N/A N/A N/A N/A parent_span tracer start_span operation_name operation_name parent parent_span tags tags start_time start_time N/A N/A _baggage_key_re N/A N/A re compile ^(?i)([a-z0-9][-a-z0-9]*)$ canonicalize_baggage_key N/A N/A key N/A N/A N/A canonicalize_baggage_key returns a canonicalized key if it's valid.

    :param key: a string that is expected to match the pattern specified by
        `get_baggage_item()`.

    :return: Returns the canonicalized key if it's valid, otherwise it returns
        None.
     N/A N/A N/A N/A _baggage_key_re match key None N/A N/A N/A N/A key lower N/A None N/A