def init_tracing(tracer=None, start_span_cb=None):
    """
    Set our tracer for Redis. Tracer objects from the
    OpenTracing django/flask/pyramid libraries can be passed as well.

    :param tracer: the tracer object.
    """
    if start_span_cb is not None and not callable(start_span_cb):
        raise ValueError('start_span_cb is not callable')
    global _g_tracer, _g_start_span_cb
    if hasattr(tracer, '_tracer'):
        tracer = tracer._tracer
    _g_tracer = tracer
    _g_start_span_cb = start_span_cb
