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

# Uptime Monitoring

> How we've configured uptime monitoring in `zopio`.

Uptime monitoring functionality is configured through BetterStack's dashboard.

## Setting up monitoring

When you create your project, we recommend adding some specific URLs to monitor. Assuming we're using `zopio.com` and it's subdomains, here's what you should add:

1. `zopio.com` - the `web` project, should be up if the index page returns a successful response.
2. `app.zopio.com` - the `app` project, should be up if the index page returns a successful response.
3. `api.zopio.com/health` - the `api` project, should be up if the `health` route returns a successful response. This is a stub endpoint that runs on Edge runtime so it's very quick.

## Usage in the UI

`zopio` provides a `Status` component from `@repo/observability` that displays the current status of the application. You can see an example of this in the website footer.

The status component shows 3 potential states:

* `All systems normal` - 100% of the uptime monitors are reporting up
* `Partial outage` - at least one uptime monitor is reporting down
* `Degraded performance` - 0% of the uptime monitors are reporting up

This functionality relies on the `BETTERSTACK_API_KEY` and `BETTERSTACK_URL` environment variables.
