mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
feat: Add OpenTelemetry integration for API service
This change introduces OpenTelemetry dependencies, and uses `opentelemetry-instrument` auto-instrumentation to allow users to configure OpenTelemetry settings via environment variables [1]. The only custom environment variable added is `OTEL_SERVICE_NAME_PREFIX`, which allows users to set a prefix to the service names included by RomM to differentiate between `api`, `worker`, and `watcher` services. The instrumentation of RQ workers and file watcher will be added in subsequent pull requests. [1] https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
This commit is contained in:
@@ -89,7 +89,9 @@ start_bin_gunicorn() {
|
||||
# commands to start our main application and store its PID to check for crashes
|
||||
info_log "Starting backend"
|
||||
|
||||
gunicorn \
|
||||
opentelemetry-instrument \
|
||||
--service_name "${OTEL_SERVICE_NAME_PREFIX-}api" \
|
||||
gunicorn \
|
||||
--bind=0.0.0.0:5000 \
|
||||
--bind=unix:/tmp/gunicorn.sock \
|
||||
--pid=/tmp/gunicorn.pid \
|
||||
|
||||
Reference in New Issue
Block a user