Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/aap_eda/settings/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@


MIDDLEWARE = [
'ansible_base.lib.middleware.observability.ObservabilityMiddleware',
"aap_eda.middleware.request_log_middleware.RequestLogMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
Expand Down Expand Up @@ -179,4 +180,17 @@
ANSIBLE_BASE_ALLOW_SINGLETON_USER_ROLES = True
ANSIBLE_BASE_CHECK_RELATED_PERMISSIONS = ["view"]

# Observability and Profiling Settings
# Each feature can be independently enabled/disabled for safe production use
# ANSIBLE_BASE_PROFILE_TIMING: Add X-API-Time header (minimal overhead, safe for prod)
# ANSIBLE_BASE_PROFILE_NODE: Add X-API-Node header (may expose internal topology)
# ANSIBLE_BASE_CPROFILE_REQUESTS: Generate cProfile files (high overhead, debug only)
# ANSIBLE_BASE_SQL_PROFILING: Add SQL metrics + trace_id comments (moderate overhead)
ANSIBLE_BASE_PROFILE_TIMING = False
ANSIBLE_BASE_PROFILE_NODE = False
ANSIBLE_BASE_CPROFILE_REQUESTS = False
ANSIBLE_BASE_SQL_PROFILING = False
# Directory where cProfile files are written (defaults to system temp directory if not set)
ANSIBLE_BASE_CPROFILE_DIR = '/tmp'

DEFAULT_SYSTEM_PG_NOTIFY_CREDENTIAL_NAME = "_DEFAULT_EDA_PG_NOTIFY_CREDS"
Loading