tornado_opentracing/_tracing.py
def trace(self, *attributes):
        """
        Function decorator that traces functions
        NOTE: Must be placed before the Tornado decorators
        @param attributes any number of request attributes
        (strings) to be set as tags on the created span
        """

        @wrapt.decorator
        def wrapper(wrapped, instance, args, kwargs):
            if self._trace_all:
                return wrapped(*args, **kwargs)

            handler = instance

            with tornado_context():
                try:
                    self._apply_tracing(handler, list(attributes))

                    # Run the actual function.
                    result = wrapped(*args, **kwargs)
                    self._handle_wrapped_result(handler, result)
                except Exception as exc:
                    self._finish_tracing(handler, error=exc, tb=sys.exc_info()[2])
                    raise

            return result

        return wrapper

        Function decorator that traces functions
        NOTE: Must be placed before the Tornado decorators
        @param attributes any number of request attributes
        (strings) to be set as tags on the created span
        
Function decorator that traces functions
NOTE: Must be placed before the Tornado decorators
@param attributes any number of request attributes
(strings) to be set as tags on the created span
Function decorator that traces functions NOTE : Must be placed before the Tornado decorators @param attributes any number of request attributes ( strings ) to be set as tags on the created span
def trace(self, *attributes):
        @wrapt.decorator
        def wrapper(wrapped, instance, args, kwargs):
            if self._trace_all:
                return wrapped(*args, **kwargs)
            handler = instance
            with tornado_context():
                try:
                    self._apply_tracing(handler, list(attributes))
                    result = wrapped(*args, **kwargs)
                    self._handle_wrapped_result(handler, result)
                except Exception as exc:
                    self._finish_tracing(handler, error=exc, tb=sys.exc_info()[2])
                    raise
            return result
        return wrapper
def trace ( self , * attributes ) : @ wrapt . decorator def wrapper ( wrapped , instance , args , kwargs ) : if self . _trace_all : return wrapped ( * args , ** kwargs ) handler = instance with tornado_context ( ) : try : self . _apply_tracing ( handler , list ( attributes ) ) result = wrapped ( * args , ** kwargs ) self . _handle_wrapped_result ( handler , result ) except Exception as exc : self . _finish_tracing ( handler , error = exc , tb = sys . exc_info ( ) [ 2 ] ) raise return result return wrapper
Function decorator that traces functions
NOTE: Must be placed before the Tornado decorators
@param attributes any number of request attributes
(strings) to be set as tags on the created span
Function decorator that traces functions NOTE : Must be placed before the Tornado decorators @param attributes any number of request attributes ( strings ) to be set as tags on the created span
"""
        Function decorator that traces functions
        NOTE: Must be placed before the Tornado decorators
        @param attributes any number of request attributes
        (strings) to be set as tags on the created span
        """ # Run the actual function.
self