Judgment Labs Logo
Other

Requests

Trace Requests HTTP calls with Judgment.

Requests tracing uses the standard OpenTelemetry Requests instrumentation and routes outbound HTTP spans through Judgment.

uv add judgeval requests opentelemetry-instrumentation-requests
pip install judgeval requests opentelemetry-instrumentation-requests
requests_tracing.py
import requests
from judgeval import Tracer
from opentelemetry.instrumentation.requests import RequestsInstrumentor

Tracer.init(project_name="requests_app")
Tracer.registerOTELInstrumentation(RequestsInstrumentor())

requests.get("https://example.com")
Tracer.force_flush()

On this page

No Headings