def METHOD_NAME(func, handler, args, kwargs):
    """
    Wrap the handler execute method so that the entire request is within the same
    ``TracerStackContext``. This simplifies users code when the automatic ``Context``
    retrieval is used via ``Tracer.trace()`` method.
    """
    # retrieve tracing settings
    settings = handler.settings[CONFIG_KEY]
    tracer = settings["tracer"]
    service = settings["default_service"]
    distributed_tracing = settings["distributed_tracing"]
    with TracerStackContext():
        trace_utils.activate_distributed_headers(
            tracer, int_config=config.tornado, request_headers=handler.request.headers, override=distributed_tracing
        )
        # store the request span in the request so that it can be used later
        request_span = tracer.trace(
            schematize_url_operation("tornado.request", protocol="http", direction=SpanDirection.INBOUND),
            service=service,
            span_type=SpanTypes.WEB,
        )
        request_span.set_tag_str(COMPONENT, config.tornado.integration_name)
        # set span.kind to the type of operation being performed
        request_span.set_tag_str(SPAN_KIND, SpanKind.SERVER)
        request_span.set_tag(SPAN_MEASURED_KEY)
        # set analytics sample rate
        # DEV: tornado is special case maintains separate configuration from config api
        analytics_enabled = settings["analytics_enabled"]
        if (config.analytics_enabled and analytics_enabled is not False) or analytics_enabled is True:
            request_span.set_tag(ANALYTICS_SAMPLE_RATE_KEY, settings.get("analytics_sample_rate", True))
        setattr(handler.request, REQUEST_SPAN_KEY, request_span)
        return func(*args, **kwargs)