-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
56 lines (47 loc) · 1.98 KB
/
Copy path.env.example
File metadata and controls
56 lines (47 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Example environment configuration for CodeBot
# Required
BOT_TOKEN=replace_me
MONGODB_URL=mongodb://localhost:27017/codebot
# WebApp slow request logging (milliseconds; 0=disabled)
SLOW_MS=500
# HTTP sync slow logging (milliseconds; 0=disabled)
HTTP_SLOW_MS=400
# MongoDB slow command logging (milliseconds; 0=disabled)
DB_SLOW_MS=20
# --- Database Health Dashboard (Admin) ---
# Token להגנה על נתיבי /api/db/* (Authorization: Bearer <token>)
DB_HEALTH_TOKEN=replace_me
# סף לזיהוי שאילתות איטיות (באלפיות שנייה)
DB_HEALTH_SLOW_THRESHOLD_MS=1000
# תדירויות רענון בצד הלקוח (שניות) - לשימוש/תיעוד
DB_HEALTH_POOL_REFRESH_SEC=5
DB_HEALTH_OPS_REFRESH_SEC=10
# --- Query Performance Profiler (MongoDB) ---
# האם הפרופיילר פעיל
PROFILER_ENABLED=true
# סף זמן לשאילתה איטית (במילישניות)
PROFILER_SLOW_THRESHOLD_MS=100
# מקסימום שאילתות בזיכרון (לצורכי UI מהיר, גם כשיש persistence)
PROFILER_MAX_BUFFER_SIZE=1000
# טוקן אימות ל-API (נשלח ב-header: X-Profiler-Token). ריק = הסתמכות על הרשאת Admin ב-WebApp.
PROFILER_AUTH_TOKEN=replace_me
# allowlist של IPs (מופרד בפסיקים) - אופציונלי
PROFILER_ALLOWED_IPS=
# Rate limit (בקשות לדקה) ל-endpoints של הפרופיילר
PROFILER_RATE_LIMIT=60
# Metrics לפרופיילר (Prometheus)
PROFILER_METRICS_ENABLED=true
# HTTP sync connection pooling
REQUESTS_POOL_CONNECTIONS=20
REQUESTS_POOL_MAXSIZE=100
REQUESTS_TIMEOUT=8
REQUESTS_RETRIES=2
REQUESTS_RETRY_BACKOFF=0.2
# aiohttp (async HTTP)
AIOHTTP_POOL_LIMIT=100
AIOHTTP_LIMIT_PER_HOST=25
AIOHTTP_TIMEOUT_TOTAL=15
# Observability / Anomaly detection
# Comma-separated list of URL paths to exclude from EWMA + slow-endpoint sampling.
# Note: metrics are still recorded; this does NOT fix main-thread starvation.
ANOMALY_IGNORE_ENDPOINTS=/api/observability/aggregations,/api/observability/timeseries