Skip to content

Commit 3cb2575

Browse files
committed
refactor: remove plugin health monitoring and debugging features
This commit removes several components related to plugin health monitoring and debugging: - PluginHealthCollector middleware - PluginHealthCommand - PluginLogViewerCommand - PluginDebugMiddleware - PluginHealthMonitor service - PluginHealthAlertSystem service - PluginDebugCommand The removed features were part of an experimental monitoring system that is no longer needed in the core package.
1 parent a442d3f commit 3cb2575

11 files changed

+3
-2722
lines changed

config/laravel-plugin-system.php

Lines changed: 0 additions & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -57,204 +57,4 @@
5757
|
5858
*/
5959
'enable_volt_support' => true,
60-
61-
/*
62-
|--------------------------------------------------------------------------
63-
| Health Monitoring
64-
|--------------------------------------------------------------------------
65-
|
66-
| Configuration for plugin health monitoring system.
67-
|
68-
*/
69-
'health_monitoring' => [
70-
/*
71-
|--------------------------------------------------------------------------
72-
| Enable Health Monitoring
73-
|--------------------------------------------------------------------------
74-
|
75-
| Whether to enable the plugin health monitoring system.
76-
|
77-
*/
78-
'enabled' => env('PLUGIN_HEALTH_MONITORING_ENABLED', true),
79-
80-
/*
81-
|--------------------------------------------------------------------------
82-
| Health Thresholds
83-
|--------------------------------------------------------------------------
84-
|
85-
| Thresholds for determining plugin health status.
86-
|
87-
*/
88-
'thresholds' => [
89-
'memory_usage_mb' => env('PLUGIN_HEALTH_MEMORY_THRESHOLD', 100),
90-
'response_time_ms' => env('PLUGIN_HEALTH_RESPONSE_TIME_THRESHOLD', 5000),
91-
'error_rate_percent' => env('PLUGIN_HEALTH_ERROR_RATE_THRESHOLD', 5),
92-
'uptime_percent' => env('PLUGIN_HEALTH_UPTIME_THRESHOLD', 95),
93-
'cpu_usage_percent' => env('PLUGIN_HEALTH_CPU_THRESHOLD', 80),
94-
],
95-
96-
/*
97-
|--------------------------------------------------------------------------
98-
| Alert System
99-
|--------------------------------------------------------------------------
100-
|
101-
| Configuration for health monitoring alerts.
102-
|
103-
*/
104-
'alerts' => [
105-
'enabled' => env('PLUGIN_HEALTH_ALERTS_ENABLED', true),
106-
'channels' => ['log'], // Available: log, email, slack, webhook
107-
'cooldown_minutes' => env('PLUGIN_HEALTH_ALERT_COOLDOWN', 60),
108-
],
109-
110-
/*
111-
|--------------------------------------------------------------------------
112-
| Alert Thresholds
113-
|--------------------------------------------------------------------------
114-
|
115-
| Thresholds for triggering alerts.
116-
|
117-
*/
118-
'alert_thresholds' => [
119-
'critical_error_count' => env('PLUGIN_HEALTH_CRITICAL_ERROR_COUNT', 5),
120-
'warning_error_count' => env('PLUGIN_HEALTH_WARNING_ERROR_COUNT', 10),
121-
'memory_threshold' => env('PLUGIN_HEALTH_ALERT_MEMORY_THRESHOLD', 100 * 1024 * 1024), // 100MB
122-
'response_time_threshold' => env('PLUGIN_HEALTH_ALERT_RESPONSE_TIME', 5000), // 5 seconds
123-
'uptime_threshold' => env('PLUGIN_HEALTH_ALERT_UPTIME', 95), // 95%
124-
],
125-
126-
/*
127-
|--------------------------------------------------------------------------
128-
| Email Notifications
129-
|--------------------------------------------------------------------------
130-
|
131-
| Email settings for health monitoring alerts.
132-
|
133-
*/
134-
'email_recipients' => env('PLUGIN_HEALTH_EMAIL_RECIPIENTS', ''),
135-
136-
/*
137-
|--------------------------------------------------------------------------
138-
| Slack Integration
139-
|--------------------------------------------------------------------------
140-
|
141-
| Slack webhook URL for health monitoring alerts.
142-
|
143-
*/
144-
'slack_webhook_url' => env('PLUGIN_HEALTH_SLACK_WEBHOOK', ''),
145-
146-
/*
147-
|--------------------------------------------------------------------------
148-
| Custom Webhook
149-
|--------------------------------------------------------------------------
150-
|
151-
| Custom webhook URL for health monitoring alerts.
152-
|
153-
*/
154-
'webhook_url' => env('PLUGIN_HEALTH_WEBHOOK_URL', ''),
155-
156-
/*
157-
|--------------------------------------------------------------------------
158-
| Storage Path
159-
|--------------------------------------------------------------------------
160-
|
161-
| Path where health monitoring data will be stored.
162-
|
163-
*/
164-
'storage_path' => storage_path('app/plugin-health'),
165-
166-
/*
167-
|--------------------------------------------------------------------------
168-
| Cache Settings
169-
|--------------------------------------------------------------------------
170-
|
171-
| Cache configuration for health monitoring.
172-
|
173-
*/
174-
'cache' => [
175-
'prefix' => 'plugin_health_',
176-
'ttl' => env('PLUGIN_HEALTH_CACHE_TTL', 3600), // 1 hour
177-
],
178-
],
179-
180-
/*
181-
|--------------------------------------------------------------------------
182-
| Debug Configuration
183-
|--------------------------------------------------------------------------
184-
|
185-
| Configuration for plugin debugging and profiling tools.
186-
|
187-
*/
188-
'debug' => [
189-
/*
190-
|--------------------------------------------------------------------------
191-
| Enable Debug Mode
192-
|--------------------------------------------------------------------------
193-
|
194-
| Whether to enable plugin debugging features.
195-
| This should be disabled in production.
196-
|
197-
*/
198-
'enabled' => env('PLUGIN_DEBUG_ENABLED', env('APP_DEBUG', false)),
199-
200-
/*
201-
|--------------------------------------------------------------------------
202-
| Debug Routes
203-
|--------------------------------------------------------------------------
204-
|
205-
| Specific routes that should trigger debug middleware.
206-
| Leave empty to debug all routes when debug headers/params are present.
207-
|
208-
*/
209-
'routes' => [
210-
// 'plugin.example.index',
211-
// 'plugin.*.show',
212-
],
213-
214-
/*
215-
|--------------------------------------------------------------------------
216-
| Profiling Configuration
217-
|--------------------------------------------------------------------------
218-
|
219-
| Settings for plugin profiling and performance analysis.
220-
|
221-
*/
222-
'profiling' => [
223-
'enabled' => env('PLUGIN_PROFILING_ENABLED', true),
224-
'memory_tracking' => env('PLUGIN_PROFILING_MEMORY', true),
225-
'query_tracking' => env('PLUGIN_PROFILING_QUERIES', true),
226-
'slow_query_threshold' => env('PLUGIN_SLOW_QUERY_THRESHOLD', 100), // milliseconds
227-
],
228-
229-
/*
230-
|--------------------------------------------------------------------------
231-
| Logging Configuration
232-
|--------------------------------------------------------------------------
233-
|
234-
| Settings for debug logging.
235-
|
236-
*/
237-
'logging' => [
238-
'enabled' => env('PLUGIN_DEBUG_LOGGING', true),
239-
'log_channel' => env('PLUGIN_DEBUG_LOG_CHANNEL', 'single'),
240-
'log_requests' => env('PLUGIN_DEBUG_LOG_REQUESTS', true),
241-
'log_responses' => env('PLUGIN_DEBUG_LOG_RESPONSES', true),
242-
'sanitize_sensitive_data' => env('PLUGIN_DEBUG_SANITIZE', true),
243-
],
244-
245-
/*
246-
|--------------------------------------------------------------------------
247-
| Cache Configuration
248-
|--------------------------------------------------------------------------
249-
|
250-
| Settings for debug data caching.
251-
|
252-
*/
253-
'cache' => [
254-
'enabled' => env('PLUGIN_DEBUG_CACHE', true),
255-
'cache_ttl' => env('PLUGIN_DEBUG_CACHE_TTL', 3600), // 1 hour
256-
'max_history' => env('PLUGIN_DEBUG_MAX_HISTORY', 100),
257-
'max_entries' => env('PLUGIN_DEBUG_MAX_ENTRIES', 1000),
258-
],
259-
],
26060
];

0 commit comments

Comments
 (0)