# Monitoring

## Configure logging, metrics, and error reporting for your Relay installation.

## [Logging](#logging)

Relay produces logs to the standard error stream (`stderr`), with `INFO` logging level by default. For example, after starting Relay you may see output such as this:

```bash
INFO  relay::setup > launching relay from config folder .relay
INFO  relay::setup >   relay mode: managed
INFO  relay::setup >   relay id: cde0d72e-0c4e-4550-a934-c1867d8a177c
INFO  relay::setup >   log level: INFO
```

This example displays the messages with the default logging level (`INFO`), which you can modify so it displays either more or less information. For details about configuring logging please see the [Logging](/product/relay/options/#logging) section on the options page.

## [Error Reporting](#error-reporting)

By default, Relay logs errors to the configured logger. You can enable error reporting to your project in Sentry in the Relay configuration file:

```yaml
sentry:
  enabled: true
  dsn: <your_dsn>
```

More information about available options and their meaning can be found [on the options page](/product/relay/options/#internal-error-reporting).

## [Health Checks](#health-checks)

Relay provides two URLs for checking system status:

* `GET /api/relay/healthcheck/live/`: Tests if Relay is running and listening to HTTP requests.
* `GET /api/relay/healthcheck/ready/`: Tests if Relay is authenticated with the upstream and operating normally.

Both endpoints return a *200 OK* response when successful:

```json
{
  "is_healthy": true
}
```

## [Metrics](#metrics)

You can submit stats to a StatsD server by configuring the `metrics.statsd` key to an `ip:port` tuple.

### [Example Configuration](#example-configuration)

```yaml
metrics:
  # Endpoint of your StatsD server
  statsd: 127.0.0.1:8126
  # Prefix all metric names with this string
  prefix: mycompany.relay
```

The options for configuring metrics reporting are documented on the [options page](/product/relay/options/#statsd-metrics).

## [Learn More](#learn-more)

* #### [Collected Metrics](/product/relay/monitoring/collected-metrics/)

  Learn what metrics Relay produces.
