Metrics
This document explains how to add a metrics exporter for Prometheus to LibreChat.
General

You can use Prometheus or any other OpenMetrics compatible monitoring tool to get metrics about active usage of LibreChat. This includes technical information like the usage of tokens, but also information about end users like the number of total or active users.
The metrics exporter is available at virtUOS/librechat_exporter. It is a separate tool you deploy alongside LibreChat.
Setup
To deploy the exporter, just add the necessary container to your compose configuration like this:
You can optionally also configure the exporter. But usually, the defaults should be just fine.
Usage
You can now add the exporter to your Prometheus scrape configuration:
Once scraping the metrics has started, look for librechat_* metrics (e.g., librechat_registered_users).
The exporter provides several metrics.
Have fun building your Grafana dashboard!
How is this guide?