open-telemetry / open-telemetry/opentelemetry-python-contrib
[opentelemetry-instrumentation-requests] Doesn't seem to instrument requests.Session
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Describe your environment
Python 3.9.0
opentelemetry-instrumentation-requests 0.33b0
requests 2.28.2
Steps to reproduce
import requests
from requests.adapters import HTTPAdapter, Retry
from requests.exceptions import RetryError
session = requests.Session()
retry = Retry(
total=5,
read=2,
connect=2,
)
adapter = HTTPAdapter(max_retries=retry)
session.mount("http://", adapter)
session.get("https://pypi.org/project/opentelemetry-instrumentation-requests/")
What is the expected behavior?
Instrument successfully
What is the actual behavior?
Does not instrument successfully
Additional context
Add any other context about the problem here.
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 in the opentelemetry-instrumentation-requests package and reproduce the report with a requests.Session configured with HTTPAdapter and Retry. Trace the session.get call and compare it with the instrumentation's supported request path. Done means the shown session request is instrumented successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100