Commit e2a49d4
timhauke
feat: Introduce comprehensive observability and configuration options
This commit significantly expands the bot's configuration capabilities and introduces new observability features.
Key changes include:
* **Enhanced `.env.example`**: Added numerous new environment variables for:
* Detailed logging configuration (level, format, file rotation, retention).
* Sentry integration for error tracking.
* Dedicated services: Command Analytics, Queue Telemetry, Lyrics, Scaling, DJ Roles, Chaos, Event Loop Profiling, Search Cache, Shard Supervisor, Metrics, Command Reference, Local Sandbox, Performance, Analytics, Code Coverage, Type Checking.
* Fine-grained bot settings: owner ID, prefix, activity, status, intents, sharding, player limits, queue/playlist sizes, track duration, search limits, and command cooldowns.
* Updated default values for Lavalink and Redis to `localhost` for easier local development.
* Adjusted crossfade defaults.
* **Type Checking Integration**: Added `pyrightconfig.json` and `scripts/typecheck.sh` to enable static type analysis.
* **Documentation**: Added `docs/development.md` and updated `FURTHER_DEVELOPMENT.md`, `README.md`, and `config.yml` to reflect new features and configuration.
* **Core Logic Updates**:
* `src/main.py`: Integrated new configuration loading and service initialization based on the expanded settings.
* `src/configs/settings.py` and `src/configs/schema.py`: Updated to support the new environment variables and configuration structure.
* `src/events/music_events.py`: Added `_telemetry` and `_emit_queue_event` methods, and integrated lyrics fetching.
* `src/services/lavalink_service.py`: Updated to use new Lavalink configuration.
* `src/services/profile_service.py`: Added event loop profiling.
* `src/services/autoplay_service.py`, `src/services/playlist_service.py`: Minor adjustments.
* **New Services/Modules (untracked files)**: The diff indicates the addition of many new files and directories related to the services mentioned above (e.g., `src/commands/chaos_commands.py`, `src/services/metrics_service.py`, `docs/analytics.md`, `tests/`). While not part of the diff, their presence in `??` suggests a major feature addition.
This commit lays the groundwork for advanced monitoring, debugging, and feature development by centralizing configuration and introducing modular service architecture.1 parent 14a3274 commit e2a49d4
File tree
5 files changed
+57
-13
lines changed- docs
- scripts
5 files changed
+57
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
313 | 317 | | |
314 | 318 | | |
315 | 319 | | |
| |||
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
324 | | - | |
325 | | - | |
| 328 | + | |
| 329 | + | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments