# Path: osprofiler/drivers/base.py
# LOG = logging.getLogger(__name__)
# def get_driver(connection_string, *args, **kwargs):
#     def __init__(self, connection_str, project=None, service=None, host=None,
#                  **kwargs):
#     def notify(self, info, **kwargs):
#     def get_report(self, base_id):
#     def get_name(cls):
#     def list_traces(self, fields=None):
#     def list_error_traces(self):
#     def _build_tree(nodes):
#     def _append_results(self, trace_id, parent_id, name, project, service,
#                         host, timestamp, raw_payload=None):
#     def _parse_results(self):
#         def msec(dt):
# class Driver(object):
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):


from urllib import parse as parser
from debtcollector import removals
from oslo_config import cfg
from oslo_serialization import jsonutils
from osprofiler.drivers import base
from osprofiler import exc
            from redis import StrictRedis
            from redis.sentinel import Sentinel
        for data in iterate_events():
            n = jsonutils.loads(data)
            trace_id = n["trace_id"]
            parent_id = n["parent_id"]
            name = n["name"]
            project = n["project"]
            service = n["service"]
            host = n["info"]["host"]
            timestamp = n["timestamp"]

            self._append_results(trace_id, parent_id, name, project, service,
                                 host, timestamp, n)

        return self._parse_results()


class RedisSentinel(Redis, base.Driver):
    @removals.removed_kwarg("db", message="'db' parameter is deprecated "
                                          "and will be removed in future. "
                                          "Please specify 'db' in "
                                          "'connection_string' instead.")
    def __init__(self, connection_str, db=0, project=None,
                 service=None, host=None, conf=cfg.CONF, **kwargs):
        """Redis driver for OSProfiler."""

        super(RedisSentinel, self).__init__(connection_str, project=project,
                                            service=service, host=host,
                                            conf=conf, **kwargs)
        try:
        except ImportError:

# Path: osprofiler/drivers/base.py
# LOG = logging.getLogger(__name__)
# def get_driver(connection_string, *args, **kwargs):
#     def __init__(self, connection_str, project=None, service=None, host=None,
#                  **kwargs):
#     def notify(self, info, **kwargs):
#     def get_report(self, base_id):
#     def get_name(cls):
#     def list_traces(self, fields=None):
#     def list_error_traces(self):
#     def _build_tree(nodes):
#     def _append_results(self, trace_id, parent_id, name, project, service,
#                         host, timestamp, raw_payload=None):
#     def _parse_results(self):
#         def msec(dt):
# class Driver(object):
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):


# Path: osprofiler/drivers/redis_driver.py
from urllib import parse as parser
from debtcollector import removals
from oslo_config import cfg
from oslo_serialization import jsonutils
from osprofiler.drivers import base
from osprofiler import exc
            from redis import StrictRedis
            from redis.sentinel import Sentinel

        for data in iterate_events():
            n = jsonutils.loads(data)
            trace_id = n["trace_id"]
            parent_id = n["parent_id"]
            name = n["name"]
            project = n["project"]
            service = n["service"]
            host = n["info"]["host"]
            timestamp = n["timestamp"]

            self._append_results(trace_id, parent_id, name, project, service,
                                 host, timestamp, n)

        return self._parse_results()


class RedisSentinel(Redis, base.Driver):
    @removals.removed_kwarg("db", message="'db' parameter is deprecated "
                                          "and will be removed in future. "
                                          "Please specify 'db' in "
                                          "'connection_string' instead.")
    def __init__(self, connection_str, db=0, project=None,
                 service=None, host=None, conf=cfg.CONF, **kwargs):
        """Redis driver for OSProfiler."""

        super(RedisSentinel, self).__init__(connection_str, project=project,
                                            service=service, host=host,
                                            conf=conf, **kwargs)
        try:
        except ImportError:

            raise exc.CommandError(