summaryrefslogtreecommitdiff
path: root/osprofiler/drivers/mongodb.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-03-22 14:16:07 +0000
committerGerrit Code Review <review@openstack.org>2022-03-22 14:16:07 +0000
commit4bc4ed011750927306c0f1706843eac071cc5dc2 (patch)
treebf1e77db9a7bda6ec1e52d923aee9742018635f4 /osprofiler/drivers/mongodb.py
parent7300788ebda160f12a5531c46bb3c2b23d9abef1 (diff)
parentb9206a5349724a179cf90fbd7f09555cfbbd7fd1 (diff)
downloadosprofiler-4bc4ed011750927306c0f1706843eac071cc5dc2.tar.gz
Merge "Fix api index and module index"
Diffstat (limited to 'osprofiler/drivers/mongodb.py')
-rw-r--r--osprofiler/drivers/mongodb.py13
1 files changed, 5 insertions, 8 deletions
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")