def trace(self):
        """Create a trace using the context information.

        :rtype: :class:`~opencensus.trace.trace.Trace`
        :returns: The Trace object.
        """
        return base.NullContextManager()
Beispiel #2
0
    def current_span(self):
        """Return the current span."""
        try:
            cur_span = self._span_stack[-1]
        except IndexError:
            logging.error('No span in the span stack.')
            cur_span = base.NullContextManager()

        return cur_span
    def start_span(self, name='span'):
        """Start a span.

        :type name: str
        :param name: The name of the span.

        :rtype: :class:`~opencensus.trace.trace_span.TraceSpan`
        :returns: The TraceSpan object.
        """
        return base.NullContextManager()
    def span(self, name='span'):
        """Create a new span with the trace using the context information.

        :type name: str
        :param name: The name of the span.

        :rtype: :class:`~opencensus.trace.trace_span.TraceSpan`
        :returns: The TraceSpan object.
        """
        return base.NullContextManager()
 def current_span(self):
     """Return the current span."""
     return base.NullContextManager()