open-telemetry / open-telemetry/opentelemetry-python-contrib
Support autoinstrumentation of vendored requests libraries
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Is your feature request related to a problem?
I would like to be able to monitor the internals of the snowflake python connector that uses the requests library.
Describe the solution you'd like
Adding an optional argument to instrument() with the set of modules to instrument would be fine for me, as would adding an env var that lists what extra modules to try and instrument.
Describe alternatives you've considered
I have worked around this myself by copy and pasting instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/init.py into my app and then changing the request imports to look like this:
from snowflake.connector.vendored.requests.models import PreparedRequest, Response
from snowflake.connector.vendored.requests.sessions import Session
from snowflake.connector.vendored.requests.structures import CaseInsensitiveDict
Obviously this is not very maintainable.
Contributor guide
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.
Research direction
Start with instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/init.py and compare its imports with the vendored snowflake.connector.vendored.requests modules listed in the issue. Determine how optional module selection or an environment variable would fit the existing instrumentation entry point; done means the Snowflake connector's vendored requests traffic can be instrumented without copying the instrumentation code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100