---
title: "HTTPX Tracing"
description: "Trace HTTPX requests with Judgment."
sidebar:
  label: "HTTPX"
seo:
  title: "HTTPX Tracing with Judgment | Integration Docs"
  description: "Trace HTTPX spans with Judgment to connect application behavior to production AI agent monitoring and evaluation."
---

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

{/* @test-flow
  id: tracing-http-httpx
  lang: python
  env: JUDGMENT_API_KEY, JUDGMENT_ORG_ID
*/}

**uv**

```bash
uv add judgeval httpx opentelemetry-instrumentation-httpx
```

**pip**

```bash
pip install judgeval httpx opentelemetry-instrumentation-httpx
```

```python title="httpx_tracing.py"
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()
```
