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

# 5. Monitoring

- 5.1. Overview
- 5.2. Metrics
  - 5.2.1. Names

## 5.1. Overview

1
The cardant 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 cardant 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
--- | ---
cardant_up | A gauge that displays a constant 1 value while the server is up.
cardant_http_time | A gauge that logs the time each HTTP request has taken in nanoseconds.
cardant_http_requests | A counter that is incremented every time an HTTP request is handled.
cardant_http_requests_size | A counter that is incremented with the size of every HTTP request.
cardant_http_responses_size | A counter that is incremented with the size of every produced HTTP response.
cardant_http_responses_2xx | A counter that is incremented with every HTTP response that produces a 2xx status code.
cardant_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".
cardant_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".
cardant_sessions | A gauge that displays the number of currently active user sessions.

3
The package may produce other metrics, however these are undocumented and should not be relied upon.
4. Model
Previous
Front Matter
Up
6. Command-Line Interface
Next
io7m | single-page | multi-page | epub | Cardant User Manual 0.0.2