-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The pymongo
instrumentation generates some harmless-but-noisy logs for versions 3.0.0 - 4.5. There are several method names that get added to the methods we assume will be on pymongo Collections that are not valid until at least version 4.5 AFAICT. It is possible that they existed earlier and were removed for a stretch of releases.
"drop_search_index",
"create_search_indexes",
"create_search_index",
"list_search_indexes",
"update_search_index",
These should be removed from pymongo < 4.5 instrumentation attempts.
Example log record:
WARNING:scout_apm.instruments.pymongo:Failed to instrument pymongo.Collection.create_search_indexes: AttributeError("type object 'Collection' has no attribute 'create_search_indexes'")
Traceback (most recent call last):
File "/.../scout_apm_python/src/scout_apm/instruments/pymongo.py", line 39, in ensure_installed
Collection, name, wrap_collection_method(getattr(Collection, name))
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Collection' has no attribute 'create_search_indexes'
Metadata
Metadata
Assignees
Labels
No labels