pymongo instrumentation: Invalid COLLECTION_METHODS_V3 names
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- observability
Research direction
Start in src/scout_apm/instruments/pymongo.py at ensure_installed, using the listed Collection method names and the example AttributeError as the reproduction signal. Check the instrumentation behavior across the stated pymongo versions, then confirm that old versions no longer produce warnings while supported versions retain the relevant instrumentation.
Written by the indexing model from the issue text.
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'
- Dominant language
- Python
- Stars
- 77
- Forks
- 19
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scoutapp/scout_apm_python
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 42/100
scoutapp/scout_apm_python#841 ·
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 45/100
scoutapp/scout_apm_python#837 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
scoutapp/scout_apm_python#815 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
scoutapp/scout_apm_python#789 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
scoutapp/scout_apm_python#788 ·
All issues in scoutapp/scout_apm_python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100