io7m | single-page | multi-page | epub | Idstore User Manual 1.0.0-beta0010
4. Model
Previous
Front Matter
Up
6. Command-Line Interface
Next

# 5. Monitoring

- 5.1. Overview
- 5.2. Metrics
  - 5.2.1. Names
- 5.3. Grafana Dashboard

## 5.1. Overview

1
The idstore package is extensively instrumented with OpenTelemetry in order to allow for the server to be continually monitored. The package publishes metrics, logs, and traces, all of which can be independently enabled or disabled. Most installations will only want to enable metrics or logs in production; traces are more useful when trying to diagnose performance problems, or for doing actual development on the idstore package.

## 5.2. Metrics

## 5.2.1. Names

1
The package publishes the following metrics that can be used for monitoring:

### 5.2.1.2. Metrics

Name | Description
--- | ---
idstore_up | A gauge that displays a constant 1 value while the server is up.
idstore_closed_for_maintenance | A gauge that displays a 1 value while the server is in maintenance mode and 0 otherwise.
idstore_http_time | A gauge that logs the time each HTTP request has taken in nanoseconds.
idstore_http_requests | A counter that is incremented every time an HTTP request is handled.
idstore_http_requests_size | A counter that is incremented with the size of every HTTP request.
idstore_http_responses_size | A counter that is incremented with the size of every produced HTTP response.
idstore_http_responses_2xx | A counter that is incremented with every HTTP response that produces a 2xx status code.
idstore_http_responses_4xx | A counter that is incremented with every HTTP response that produces a 4xx status code. A 4xx status code should be understood to mean "blame the client".
idstore_http_responses_5xx | A counter that is incremented with every HTTP response that produces a 5xx status code. A 5xx status code should be understood to mean "blame the server".
idstore_mail_ok | A counter that is incremented every time mail is sent successfully.
idstore_mail_failed | A counter that is incremented every time mail fails to send correctly.
idstore_mail_time | A gauge that logs the time each mail operation has taken in nanoseconds.
idstore_ratelimit_triggers | A counter that is incremented every time a rate limit is violated.
idstore_ratelimit_login_delay | A gauge that produces a constant value taken directly from the configured user and admin login delays. This metric is useful because login delays add significantly to HTTP response times, and this metric can be used to subtract those delays from the logged response times.
idstore_sessions | A gauge that displays the number of currently active user or admin sessions.

3
Most metrics are labelled with various attributes that allow for distinguishing between requests that occurred as part of the user service, or part of the admin service. Metrics involving the mail system typically include the destination address as an attribute.
4
The package may produce other metrics, however these are undocumented and should not be relied upon.

## 5.3. Grafana Dashboard

1
The idstore package provides a basic Grafana dashboard. The dashboard can be imported from https://raw.githubusercontent.com/io7m/idstore/develop/com.io7m.idstore.grafana/src/main/resources/com/io7m/idstore/grafana/dashboard.json .

### 5.3.2. Dashboard

4. Model
Previous
Front Matter
Up
6. Command-Line Interface
Next
io7m | single-page | multi-page | epub | Idstore User Manual 1.0.0-beta0010