OpenTelemetry requests integration¶
This library allows tracing HTTP requests made by the popular requests library.
pip install opentelemetry-ext-http-requests
import requests import opentelemetry.ext.http_requests from opentelemetry.trace import tracer_provider opentelemetry.ext.http_requests.enable(tracer_provider()) response = requests.get(url='https://www.example.org/')
Note that calls that do not use the higher-level APIs but use
requests.sessions.Session.send (or an alias thereof) directly, are
currently not traced. If you find any other way to trigger an untraced HTTP
request, please report it via a GitHub issue with
API] in the title.
The opentelemetry-ext-requests package allows tracing HTTP requests made by the popular requests library.
Enables tracing of all requests calls that go through
Disables instrumentation of
requeststhrough this module.
Note that this only works if no other module also patches requests.