mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 20:18:02 +00:00
Add OpenTelemetry integration
This commit is contained in:
10
config.py
10
config.py
@@ -34,6 +34,9 @@ MIDDLEWARE.extend(
|
||||
"ivatar.middleware.CustomLocaleMiddleware",
|
||||
]
|
||||
)
|
||||
|
||||
# Add OpenTelemetry middleware only if feature flag is enabled
|
||||
# Note: This will be checked at runtime, not at import time
|
||||
MIDDLEWARE.insert(
|
||||
0,
|
||||
"ivatar.middleware.MultipleProxyMiddleware",
|
||||
@@ -309,6 +312,13 @@ ENABLE_MALICIOUS_CONTENT_SCAN = True
|
||||
# Logging configuration - can be overridden in local config
|
||||
# Example: LOGS_DIR = "/var/log/ivatar" # For production deployments
|
||||
|
||||
# OpenTelemetry feature flag - can be disabled for F/LOSS deployments
|
||||
ENABLE_OPENTELEMETRY = os.environ.get("ENABLE_OPENTELEMETRY", "false").lower() in (
|
||||
"true",
|
||||
"1",
|
||||
"yes",
|
||||
)
|
||||
|
||||
# This MUST BE THE LAST!
|
||||
if os.path.isfile(os.path.join(BASE_DIR, "config_local.py")):
|
||||
from config_local import * # noqa # flake8: noqa # NOQA # pragma: no cover
|
||||
|
||||
Reference in New Issue
Block a user