> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mov-eat.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability

> How Moveat uses Grafana, Loki and structured logs to understand production behavior.

# Observability

Moveat uses Grafana and Loki to inspect service logs and operational behavior.

## Goals

Observability should help answer:

* Is Platform healthy?
* Is Agent receiving messages?
* Are requests failing?
* Which correlation ID belongs to a failed user action?
* Are database or Redis dependencies unstable?
* Are logs growing too fast?

## Log flow

```mermaid theme={null}
graph LR
    Platform --> DockerLogs[Docker logs]
    Agent --> DockerLogs
    DockerLogs --> Alloy
    Alloy --> Loki
    Loki --> Grafana
```

## Correlation IDs

Platform emits correlation IDs for HTTP requests. Operations should use these IDs to connect frontend errors, Platform logs and Agent calls.

## Request body logging

Platform can log request and response bodies for debugging. Sensitive fields such as passwords must be redacted.

Body logging is useful during early product development, but should be controlled carefully as traffic and data sensitivity grow.

## Health checks

Health endpoints should be excluded from noisy operational views where possible. They are useful for uptime but can overwhelm log panels.

## Useful dashboards

| Dashboard            | Purpose                                      |
| -------------------- | -------------------------------------------- |
| Moveat Observability | Service logs, errors and correlation search. |
| Moveat Operations    | Container and operational metrics.           |

## Common investigations

| Symptom                                    | First checks                                                                         |
| ------------------------------------------ | ------------------------------------------------------------------------------------ |
| Login returns 200 but `/me` fails          | Cookie domain, CORS credentials, session storage, browser request credentials.       |
| Agent receives webhook but no data appears | Agent Platform client logs, internal token, channel resolution, Platform write logs. |
| Platform is restarting                     | Container logs, dependency injection errors, env vars, migrations.                   |
| Grafana shows no data                      | Alloy status, Loki datasource, container labels, time range.                         |
