Add documentation for the new prometheus exporter feature (#1589)
See https://github.com/mastodon/mastodon/pull/33734
This commit is contained in:
parent
a6e92cd1b1
commit
e2218cf3f8
1 changed files with 67 additions and 28 deletions
|
@ -645,14 +645,6 @@ The password used to authenticate with sentinels.
|
||||||
|
|
||||||
If set to `true`, Mastodon will use Elasticsearch for its search functions.
|
If set to `true`, Mastodon will use Elasticsearch for its search functions.
|
||||||
|
|
||||||
### Elasticsearch {#elasticsearch}
|
|
||||||
|
|
||||||
{{< page-ref page="admin/elasticsearch" >}}
|
|
||||||
|
|
||||||
#### `ES_ENABLED`
|
|
||||||
|
|
||||||
If set to `true`, Mastodon will use Elasticsearch for its search functions.
|
|
||||||
|
|
||||||
#### `ES_PRESET`
|
#### `ES_PRESET`
|
||||||
|
|
||||||
It controls the Elasticsearch indices configuration (number of shards and replica).
|
It controls the Elasticsearch indices configuration (number of shards and replica).
|
||||||
|
@ -692,26 +684,6 @@ Override Certificate Authority bundle file to use. Useful when using self-signed
|
||||||
**Version history:**\
|
**Version history:**\
|
||||||
4.3.0 - added
|
4.3.0 - added
|
||||||
|
|
||||||
### OpenTelemetry {#otel}
|
|
||||||
|
|
||||||
Mastodon supports exporting tracing data using the OpenTelemetry protocol. The instrumentation uses the standard OTEL Ruby SDK, and should support the [standard OTEL environment configuration variables](https://opentelemetry.io/docs/languages/sdk-configuration/general/), with the exception of `OTEL_SERVICE_NAME` (see `OTEL_SERVICE_NAME_PREFIX` below). Mastodon currently only ships with the OLTP exporter.
|
|
||||||
|
|
||||||
**Version history:**\
|
|
||||||
4.3.0 - added support for the Ruby backend
|
|
||||||
|
|
||||||
#### `OTEL_SERVICE_NAME_PREFIX`
|
|
||||||
|
|
||||||
Prefix for the OTEL service names. The services names will be `$prefix/web` and `$prefix/sidekiq`. Defaults to `mastodon`.
|
|
||||||
|
|
||||||
#### `OTEL_SERVICE_NAME_SEPARATOR`
|
|
||||||
|
|
||||||
What character to use in service names when differentiating between different services. Defaults to `/` (i.e. `mastodon/web`).
|
|
||||||
|
|
||||||
|
|
||||||
#### `OTEL_EXPORTER_OTLP_ENDPOINT`
|
|
||||||
|
|
||||||
URL of the OLTP server to send the traces to. OpenTelemetry instrumentation is disabled if this variable is not set. No default (empty value).
|
|
||||||
|
|
||||||
### SMTP email delivery {#smtp}
|
### SMTP email delivery {#smtp}
|
||||||
|
|
||||||
#### `SMTP_SERVER`
|
#### `SMTP_SERVER`
|
||||||
|
@ -774,6 +746,73 @@ By default, a StartTLS connection will be attempted to the specified SMTP server
|
||||||
|
|
||||||
Note that `TLSv1.3` and `TLSv1.2` are the only SSL/TLS protocols currently considered to be secure.
|
Note that `TLSv1.3` and `TLSv1.2` are the only SSL/TLS protocols currently considered to be secure.
|
||||||
|
|
||||||
|
### Prometheus Metrics {#prometheus}
|
||||||
|
|
||||||
|
Mastodon optionally supports exposing some metrics using the Prometheus format.
|
||||||
|
|
||||||
|
For the Ruby processes, it is using the [`prometheus_exporter` gem](https://github.com/discourse/prometheus_exporter). Please refer to their documentation for more details.
|
||||||
|
|
||||||
|
By default, you will need to run a `prometheus_exporter` server (using `./bin/prometheus_exporter`) to collect the metrics and expose them to be scraped. See `MASTODON_PROMETHEUS_EXPORTER_LOCAL` if you want to change this behaviour.
|
||||||
|
|
||||||
|
Note that metrics in the Prometheus format are always enabled for the streaming server, and can be accessed at `http://streaming-server-host:port/metrics`
|
||||||
|
|
||||||
|
**Version history:**\
|
||||||
|
4.4.0 - added support for the Ruby processes
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_ENABLED`
|
||||||
|
|
||||||
|
If set to `true`, Mastodon's Ruby processes (web & Sidekiq) will enable the Prometheus instrumentation.
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_WEB_DETAILED_METRICS`
|
||||||
|
|
||||||
|
If set to `true`, the instrumentation will collect and expose per-controller/action metrics for every web request. Note that this might cause some resource overhead.
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_SIDEKIQ_DETAILED_METRICS`
|
||||||
|
|
||||||
|
If set to `true`, the instrumentation will collect and expose per job metrics for every Sidekiq job. Note that this might cause some resource overhead.
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_LOCAL`
|
||||||
|
|
||||||
|
If set to `true`, an in-process server will be started to expose the metrics, rather than trying to send them to an external `prometheus_exporter` server. This can be useful when running Sidekiq in a containerized environment to avoid the overhead of the external exporter. Metrics will be exposed on `http://host:port/metrics`
|
||||||
|
|
||||||
|
Important: this will not work for multi-process servers, like Puma, as every process will try to listen on the same port and will fail.
|
||||||
|
|
||||||
|
#### `PROMETHEUS_EXPORTER_HOST`
|
||||||
|
|
||||||
|
If the in-process server is not enabled, the metrics will be sent to this host (which should be running a `prometheus_exporter` server). Defaults to `localhost`.
|
||||||
|
|
||||||
|
#### `PROMETHEUS_EXPORTER_PORT`
|
||||||
|
|
||||||
|
If the in-process server is not enabled, the metrics will be sent to this host (which should be running a `prometheus_exporter` server). Defaults to `9394`.
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_HOST`
|
||||||
|
|
||||||
|
If the in-process server is enabled, the in-process exporter will listen on this host. Defaults to `localhost`
|
||||||
|
|
||||||
|
#### `MASTODON_PROMETHEUS_EXPORTER_PORT`
|
||||||
|
|
||||||
|
If the in-process server is enabled, the in-process exporter will listen on this port. Defaults to `9394`
|
||||||
|
|
||||||
|
### OpenTelemetry {#otel}
|
||||||
|
|
||||||
|
Mastodon supports exporting tracing data using the OpenTelemetry protocol. The instrumentation uses the standard OTEL Ruby SDK, and should support the [standard OTEL environment configuration variables](https://opentelemetry.io/docs/languages/sdk-configuration/general/), with the exception of `OTEL_SERVICE_NAME` (see `OTEL_SERVICE_NAME_PREFIX` below). Mastodon currently only ships with the OLTP exporter.
|
||||||
|
|
||||||
|
**Version history:**\
|
||||||
|
4.3.0 - added support for the Ruby backend
|
||||||
|
|
||||||
|
#### `OTEL_SERVICE_NAME_PREFIX`
|
||||||
|
|
||||||
|
Prefix for the OTEL service names. The services names will be `$prefix/web` and `$prefix/sidekiq`. Defaults to `mastodon`.
|
||||||
|
|
||||||
|
#### `OTEL_SERVICE_NAME_SEPARATOR`
|
||||||
|
|
||||||
|
What character to use in service names when differentiating between different services. Defaults to `/` (i.e. `mastodon/web`).
|
||||||
|
|
||||||
|
|
||||||
|
#### `OTEL_EXPORTER_OTLP_ENDPOINT`
|
||||||
|
|
||||||
|
URL of the OLTP server to send the traces to. OpenTelemetry instrumentation is disabled if this variable is not set. No default (empty value).
|
||||||
|
|
||||||
## File storage {#files}
|
## File storage {#files}
|
||||||
|
|
||||||
### CDN {#cdn}
|
### CDN {#cdn}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue