Judgment Labs Logo
Other

HTTPX Tracing

Trace HTTPX requests with Judgment.

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

uv add judgeval httpx opentelemetry-instrumentation-httpx
pip install judgeval httpx opentelemetry-instrumentation-httpx
httpx_tracing.py
import httpx
from judgeval import Tracer
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor

Tracer.init(project_name="httpx_app")
Tracer.registerOTELInstrumentation(HTTPXClientInstrumentor())

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

On this page

No Headings