diff options
author | XiaojueGuan <guanalbertjone@gmail.com> | 2019-05-03 15:40:04 +0800 |
---|---|---|
committer | XiaojueGuan <guanalbertjone@gmail.com> | 2019-05-03 15:53:06 +0800 |
commit | 5386d7c40cdaef39a08b69fcce96467a5396c6ee (patch) | |
tree | 49d713ac1929bd813179e001f5b68116a360f3d4 | |
parent | 9847b8984a0e8ac9c325962431c08d7dddff13bc (diff) | |
download | osprofiler-5386d7c40cdaef39a08b69fcce96467a5396c6ee.tar.gz |
change function list_traces of mongodb module
osprofiler fails when it is configed with mongon.
the minimum version of pymongo osprofile requires is 3.0.2
and in this version and after when function list_traces is
is invoked error will show described in the bug issue.
Change-Id: I2510660c36aaa89117a97c67b4cb61fa3dade14d
Closes-Bug: 1827480
-rw-r--r-- | osprofiler/drivers/mongodb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osprofiler/drivers/mongodb.py b/osprofiler/drivers/mongodb.py index 0ca1928..7713baf 100644 --- a/osprofiler/drivers/mongodb.py +++ b/osprofiler/drivers/mongodb.py @@ -81,7 +81,7 @@ class MongoDB(base.Driver): at least `base_id` and `timestamp`. """ fields = set(fields or self.default_trace_fields) - ids = self.db.profiler.find("*").distinct("base_id") + ids = self.db.profiler.find({}).distinct("base_id") out_format = {"base_id": 1, "timestamp": 1, "_id": 0} out_format.update({i: 1 for i in fields}) return [self.db.profiler.find( |