Monitoring
Endb exposes plaintext logs, Prometheus metrics, and optional OpenTelemetry tracing. Any one, or a combination, of these can be used to monitor an Endb instance.
Some monitoring options are offered as flags.
Set flags by setting the environment variable to 0 or 1
(ex. ENDB_LOG_ANSI=0).
Logging
By default, endb logs to STDOUT with a log level of endb=INFO.
Adjust the log level with the ENDB_LOG_LEVEL environment variable.
Endb uses Rust Logging
and more details about log levels are available in that document.
Other flags include:
ENDB_LOG_ANSI- turns ANSI terminal colour output on or off (on by default)ENDB_LOG_THREAD_IDS- set to enable or disable logging of thread ids (enabled by default)
Example:
docker run --rm -e ENDB_LOG_LEVEL=endb=DEBUG -e ENDB_LOG_ANSI=0 -e ENDB_LOG_THREAD_IDS=1 -p 3803:3803 -v demo_data:/app/endb_data docker.io/endatabas/endb:latest
Prometheus
A Prometheus endpoint is available at /metrics.
This endpoint is enabled by default.
If your Endb instance is running locally, you can view metrics in a browser at
http://localhost:3803/metrics
The Prometheus tracing level defaults to endb=DEBUG.
Set the tracing level with ENDB_TRACING_LEVEL.
OpenTelemetry
To enable OpenTelemetry, set ENDB_TRACING_OTEL=1 and
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317/
Configuration options for the OTLP exporter and
additional OTLP environment variables
may also prove useful for configuration.
The OpenTelemetry tracing level defaults to endb=DEBUG.
Set the tracing level with ENDB_TRACING_LEVEL.
At the moment, only gRPC metrics are exposed, not HTTP.
Metrics
Endb exposes a number of metrics to the Prometheus endpoint and OpenTelemetry. These can be useful in debugging performance of applications connected to Endb.
Histograms
query_real_time_duration_secondsquery_gc_run_time_duration_secondsquery_consed_byteshttp_request_duration_seconds
Counters
queries_activeinteractive_transactions_activebuffer_pool_usage_bytesdynamic_space_usage_bytes
Monotonic Counters
websocket_message_internal_errors_totalobject_store_read_bytes_totalobject_store_written_bytes_totalqueries_totaltransactions_conflicted_totaltransactions_committed_totaltransactions_prepared_totaltransactions_retried_totalwal_read_bytes_totalwal_written_bytes_totalhttp_requests_total
Tracing
Endb exposes a variety of tracing spans to OpenTelemetry. Tracing data is mostly useful if your Endb instance is not performing in the way you expect.
buffer_pool_evictionbuild_infocommitcompactionconstraintsgcindexlog_replaylog_rotationobject_store_deleteobject_store_getobject_store_listobject_store_putqueryshutdownsnapshotstartupwal_append_entrywal_read_next_entrywal_fsyncwebsocket_connections_activewebsocket_message_duration_secondswebsocket_messages_total