# Observability

> Traceer elke LLM-oproep met Langfuse en houd het hele systeem in de gaten met Grafana en OpenTelemetry — twee optionele stacks naast het ingebouwde dashboard.

Twee optionele stacks laten zien wat PentAGI doet: Langfuse voor model calls, en Grafana met OpenTelemetry voor de rest van het systeem.

Het eigen **Dashboard** van PentAGI toont al grafieken van [flows](https://pentagi.com/nl/docs/glossary/#flow), [tool calls](https://pentagi.com/nl/docs/glossary/#tool-call), tokens en kosten over tijd; de onderstaande stacks voegen volledige traces en systeemmetrieken toe.

![Het ingebouwde dashboard](https://pentagi.com/images/product/dashboard.webp)

## [Langfuse](https://pentagi.com/nl/docs/configuration/observability/#langfuse)

Langfuse legt prompts, completions, tokens en kosten per [agent](https://pentagi.com/nl/docs/glossary/#agent) vast.

```bash
LANGFUSE_BASE_URL=http://langfuse-web:3000
LANGFUSE_PROJECT_ID=same_as_LANGFUSE_INIT_PROJECT_ID
LANGFUSE_PUBLIC_KEY=same_as_LANGFUSE_INIT_PROJECT_PUBLIC_KEY
LANGFUSE_SECRET_KEY=same_as_LANGFUSE_INIT_PROJECT_SECRET_KEY
```

Stel de Langfuse-credentials in in `.env` (`LANGFUSE_POSTGRES_*`, `LANGFUSE_CLICKHOUSE_*`, `LANGFUSE_REDIS_AUTH`, `LANGFUSE_SALT`, `LANGFUSE_ENCRYPTION_KEY`, `LANGFUSE_NEXTAUTH_SECRET`, `LANGFUSE_INIT_USER_*` en de projectsleutels), en start daarna de stack:

```bash
curl -O https://raw.githubusercontent.com/vxcontrol/pentagi/main/docker-compose-langfuse.yml
docker compose -f docker-compose.yml -f docker-compose-langfuse.yml up -d
```

De Langfuse-UI is beschikbaar op `http://localhost:4000`.

## [Grafana en OpenTelemetry](https://pentagi.com/nl/docs/configuration/observability/#grafana-and-opentelemetry)

```bash
OTEL_HOST=otelcol:8148
```

```bash
git clone --depth 1 https://github.com/vxcontrol/pentagi.git pentagi-src
cp -r pentagi-src/observability ./observability
rm -rf pentagi-src
curl -O https://raw.githubusercontent.com/vxcontrol/pentagi/main/docker-compose-observability.yml
docker compose -f docker-compose.yml -f docker-compose-observability.yml up -d
```

Grafana is beschikbaar op `http://localhost:3000`, met metrieken in VictoriaMetrics, traces in Jaeger en logs in Loki.

> [!NOTE]
> Om Langfuse-telemetrie naar dezelfde stack te sturen, stel je `LANGFUSE_OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4318` in.

## [Alles samen](https://pentagi.com/nl/docs/configuration/observability/#everything-together)

```bash
git clone --depth 1 https://github.com/vxcontrol/pentagi.git pentagi-src
cp -r pentagi-src/examples/graphiti ./graphiti
cp -r pentagi-src/examples/neo4j ./neo4j
rm -rf pentagi-src
curl -O https://raw.githubusercontent.com/vxcontrol/pentagi/main/docker-compose-graphiti.yml
docker compose \
  -f docker-compose.yml \
  -f docker-compose-langfuse.yml \
  -f docker-compose-graphiti.yml \
  -f docker-compose-observability.yml \
  up -d
```