def execute(func, handler, args, kwargs):
    """
    Wrap the handler ``_execute`` method to trace incoming requests,
    extracting the context from the headers, if available.
    """
    tracing = handler.settings.get('opentracing_tracing')
    if tracing._trace_all:
        attrs = handler.settings.get('opentracing_traced_attributes', [])
        tracing._apply_tracing(handler, attrs)
    return func(*args, **kwargs)
