Skip to content
Judgment Labs
Esc
↑↓navigate↵open⌘Jpreview

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
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()

Was this page helpful?