def METHOD_NAME(wrapped, instance, args, kwargs):
    """Patch wsgi interface for app"""
    pin = Pin.get_from(molten)
    if not pin or not pin.enabled():
        return wrapped(*args, **kwargs)
    # DEV: This is safe because this is the args for a WSGI handler
    #   https://www.python.org/dev/peps/pep-3333/
    environ, start_response = args
    request = molten.http.Request.from_environ(environ)
    resource = func_name(wrapped)
    # request.headers is type Iterable[Tuple[str, str]]
    trace_utils.activate_distributed_headers(
        pin.tracer, int_config=config.molten, request_headers=dict(request.headers)
    )
    with pin.tracer.trace(
        schematize_url_operation("molten.request", protocol="http", direction=SpanDirection.INBOUND),
        service=trace_utils.int_service(pin, config.molten),
        resource=resource,
        span_type=SpanTypes.WEB,
    ) as span:
        span.set_tag_str(COMPONENT, config.molten.integration_name)
        # set span.kind tag equal to type of operation being performed
        span.set_tag_str(SPAN_KIND, SpanKind.SERVER)
        span.set_tag(SPAN_MEASURED_KEY)
        # set analytics sample rate with global config enabled
        span.set_tag(ANALYTICS_SAMPLE_RATE_KEY, config.molten.get_analytics_sample_rate(use_global_config=True))
        @wrapt.function_wrapper
        def _w_start_response(wrapped, instance, args, kwargs):
            """Patch respond handling to set metadata"""
            pin = Pin.get_from(molten)
            if not pin or not pin.enabled():
                return wrapped(*args, **kwargs)
            status, headers, exc_info = args
            code, _, _ = status.partition(" ")
            try:
                code = int(code)
            except ValueError:
                pass
            if not span.get_tag(MOLTEN_ROUTE):
                # if route never resolve, update root resource
                span.resource = u"{} {}".format(request.method, code)
            trace_utils.set_http_meta(span, config.molten, status_code=code)
            return wrapped(*args, **kwargs)
        # patching for extracting response code
        start_response = _w_start_response(start_response)
        url = "%s://%s:%s%s" % (
            request.scheme,
            request.host,
            request.port,
            request.path,
        )
        query = urlencode(dict(request.params))
        trace_utils.set_http_meta(
            span, config.molten, method=request.method, url=url, query=query, request_headers=request.headers
        )
        span.set_tag_str("molten.version", molten.__version__)
        return wrapped(environ, start_response, **kwargs)