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

Flask tracing uses the standard OpenTelemetry Flask instrumentation and routes
request spans through Judgment.

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

**uv**

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

**pip**

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

```python title="flask_tracing.py"
from flask import Flask, jsonify
from judgeval import Tracer
from opentelemetry.instrumentation.flask import FlaskInstrumentor

Tracer.init(project_name="flask_app")

app = Flask(__name__)
FlaskInstrumentor().instrument_app(app)


@app.get("/hello")
def hello():
    return jsonify({"message": "hello"})
```
