diff options
Diffstat (limited to 'osprofiler')
-rw-r--r-- | osprofiler/drivers/base.py | 13 | ||||
-rw-r--r-- | osprofiler/drivers/elasticsearch_driver.py | 13 | ||||
-rw-r--r-- | osprofiler/drivers/loginsight.py | 5 | ||||
-rw-r--r-- | osprofiler/drivers/messaging.py | 3 | ||||
-rw-r--r-- | osprofiler/drivers/mongodb.py | 13 | ||||
-rw-r--r-- | osprofiler/drivers/redis_driver.py | 13 |
6 files changed, 23 insertions, 37 deletions
diff --git a/osprofiler/drivers/base.py b/osprofiler/drivers/base.py index 99b37b1..f717d69 100644 --- a/osprofiler/drivers/base.py +++ b/osprofiler/drivers/base.py @@ -87,15 +87,12 @@ class Driver(object): :param info: Contains information about trace element. In payload dict there are always 3 ids: "base_id" - uuid that is common for all notifications - related to one trace. Used to simplify - retrieving of all trace elements from - the backend. + related to one trace. Used to simplify retrieving of all + trace elements from the backend. "parent_id" - uuid of parent element in trace "trace_id" - uuid of current element in trace - With parent_id and trace_id it's quite simple to build tree of trace elements, which simplify analyze of trace. - """ raise NotImplementedError("{0}: This method is either not supported " "or has to be overridden".format( @@ -119,9 +116,9 @@ class Driver(object): """Query all traces from the storage. :param fields: Set of trace fields to return. Defaults to 'base_id' - and 'timestamp' - :return List of traces, where each trace is a dictionary containing - at least `base_id` and `timestamp`. + and 'timestamp' + :returns: List of traces, where each trace is a dictionary containing + at least `base_id` and `timestamp`. """ raise NotImplementedError("{0}: This method is either not supported " "or has to be overridden".format( diff --git a/osprofiler/drivers/elasticsearch_driver.py b/osprofiler/drivers/elasticsearch_driver.py index d4a6b3d..da9be17 100644 --- a/osprofiler/drivers/elasticsearch_driver.py +++ b/osprofiler/drivers/elasticsearch_driver.py @@ -58,15 +58,12 @@ class ElasticsearchDriver(base.Driver): :param info: Contains information about trace element. In payload dict there are always 3 ids: "base_id" - uuid that is common for all notifications - related to one trace. Used to simplify - retrieving of all trace elements from - Elasticsearch. + related to one trace. Used to simplify retrieving of all + trace elements from Elasticsearch. "parent_id" - uuid of parent element in trace "trace_id" - uuid of current element in trace - With parent_id and trace_id it's quite simple to build tree of trace elements, which simplify analyze of trace. - """ info = info.copy() @@ -111,9 +108,9 @@ class ElasticsearchDriver(base.Driver): """Query all traces from the storage. :param fields: Set of trace fields to return. Defaults to 'base_id' - and 'timestamp' - :return List of traces, where each trace is a dictionary containing - at least `base_id` and `timestamp`. + and 'timestamp' + :returns: List of traces, where each trace is a dictionary containing + at least `base_id` and `timestamp`. """ query = {"match_all": {}} fields = set(fields or self.default_trace_fields) diff --git a/osprofiler/drivers/loginsight.py b/osprofiler/drivers/loginsight.py index f59518b..31fe1ee 100644 --- a/osprofiler/drivers/loginsight.py +++ b/osprofiler/drivers/loginsight.py @@ -39,13 +39,12 @@ class LogInsightDriver(base.Driver): is 3.3. The connection string to initialize the driver should be of the format: - loginsight://<username>:<password>@<loginsight-host> + loginsight://<username>:<password>@<loginsight-host> If the username or password contains the character ':' or '@', it must be escaped using URL encoding. For example, the connection string to connect to Log Insight server at 10.1.2.3 using username "osprofiler" and password - "p@ssword" is: - loginsight://osprofiler:p%40ssword@10.1.2.3 + "p@ssword" is: loginsight://osprofiler:p%40ssword@10.1.2.3 """ def __init__( self, connection_str, project=None, service=None, host=None, diff --git a/osprofiler/drivers/messaging.py b/osprofiler/drivers/messaging.py index 3381cf6..c7fbd12 100644 --- a/osprofiler/drivers/messaging.py +++ b/osprofiler/drivers/messaging.py @@ -83,10 +83,9 @@ class Messaging(base.Driver): :param info: Contains information about trace element. In payload dict there are always 3 ids: "base_id" - uuid that is common for all notifications - related to one trace. + related to one trace. "parent_id" - uuid of parent element in trace "trace_id" - uuid of current element in trace - With parent_id and trace_id it's quite simple to build tree of trace elements, which simplify analyze of trace. diff --git a/osprofiler/drivers/mongodb.py b/osprofiler/drivers/mongodb.py index 86119e4..fdd4a46 100644 --- a/osprofiler/drivers/mongodb.py +++ b/osprofiler/drivers/mongodb.py @@ -45,15 +45,12 @@ class MongoDB(base.Driver): :param info: Contains information about trace element. In payload dict there are always 3 ids: "base_id" - uuid that is common for all notifications - related to one trace. Used to simplify - retrieving of all trace elements from - MongoDB. + related to one trace. Used to simplify retrieving of all + trace elements from MongoDB. "parent_id" - uuid of parent element in trace "trace_id" - uuid of current element in trace - With parent_id and trace_id it's quite simple to build tree of trace elements, which simplify analyze of trace. - """ data = info.copy() data["project"] = self.project @@ -76,9 +73,9 @@ class MongoDB(base.Driver): """Query all traces from the storage. :param fields: Set of trace fields to return. Defaults to 'base_id' - and 'timestamp' - :return List of traces, where each trace is a dictionary containing - at least `base_id` and `timestamp`. + and 'timestamp' + :returns: List of traces, where each trace is a dictionary containing + at least `base_id` and `timestamp`. """ fields = set(fields or self.default_trace_fields) ids = self.db.profiler.find({}).distinct("base_id") diff --git a/osprofiler/drivers/redis_driver.py b/osprofiler/drivers/redis_driver.py index 48436cf..ba7a121 100644 --- a/osprofiler/drivers/redis_driver.py +++ b/osprofiler/drivers/redis_driver.py @@ -61,15 +61,12 @@ class Redis(base.Driver): :param info: Contains information about trace element. In payload dict there are always 3 ids: "base_id" - uuid that is common for all notifications - related to one trace. Used to simplify - retrieving of all trace elements from - Redis. + related to one trace. Used to simplify retrieving of all + trace elements from Redis. "parent_id" - uuid of parent element in trace "trace_id" - uuid of current element in trace - With parent_id and trace_id it's quite simple to build tree of trace elements, which simplify analyze of trace. - """ data = info.copy() data["project"] = self.project @@ -94,9 +91,9 @@ class Redis(base.Driver): """Query all traces from the storage. :param fields: Set of trace fields to return. Defaults to 'base_id' - and 'timestamp' - :return List of traces, where each trace is a dictionary containing - at least `base_id` and `timestamp`. + and 'timestamp' + :returns: List of traces, where each trace is a dictionary containing + at least `base_id` and `timestamp`. """ fields = set(fields or self.default_trace_fields) |