Optional debugging and monitoring configuration
Self-hosted Marble comes with some optional configuration related to debugging, observability and monitoring:
- Enable Prometheus metrics sampling on the
/metricsendpoint on the worker and API withENABLE_PROMETHEUS.- Note that the endpoint is not authenticated. Not exposing the endpoint on public networks is the responsibility of the deployer.
- The detail of metrics that are collected by Marble is still subject to change, and as such is not documented yet.
- In case of unexplained memory leaks of CPU spikes, profiling can be activated and configured with the
DEBUG_ENABLE_PROFILING,DEBUG_PROFILING_MODEandDEBUG_PROFILING_TOKENvariables. See table above.- Activating http debug profiling activates the
/debug/pprof/{profile|goroutine|heap|threadcare|block|mutex}endpoints. - No guarantees are given on the output format of the endpoints.
gcpmode debugging requires theroles/cloudprofiler.agent(or equivalent) role on the API/worker service account.
- Activating http debug profiling activates the
- Activate Opentelemetry tracing with
ENABLE_TRACING=true- Select otlp trace collector or GCP tracing APIs with
TRACING_EXPORTER - Custom sampling rates with
TRACING_SAMPLING_RATES
- Select otlp trace collector or GCP tracing APIs with
- Set
LOG_LEVELto"debug"for more verbose logs (disclaimer: debug logging presence is not uniform throughout the application features).
Updated about 2 hours ago