You've already forked wp-prometheus
feat: Add option to disable early mode (v0.4.2)
All checks were successful
Create Release Package / build-release (push) Successful in 56s
All checks were successful
Create Release Package / build-release (push) Successful in 56s
- Add wp_prometheus_disable_early_mode option in admin settings - Support WP_PROMETHEUS_DISABLE_EARLY_MODE environment variable - Add Early Mode section in Metrics tab with status indicator - Allow users to enable wp_prometheus_collect_metrics hook Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
CLAUDE.md
18
CLAUDE.md
@@ -291,6 +291,24 @@ add_action( 'wp_prometheus_collect_metrics', function( $collector ) {
|
||||
|
||||
## Session History
|
||||
|
||||
### 2026-02-02 - Early Mode Toggle (v0.4.2)
|
||||
|
||||
- Added option to disable early mode for users who need extensibility
|
||||
- Implementation:
|
||||
- Added `wp_prometheus_disable_early_mode` WordPress option
|
||||
- Added `WP_PROMETHEUS_DISABLE_EARLY_MODE` environment variable support
|
||||
- Option check in `wp_prometheus_early_metrics_check()` before early interception
|
||||
- Environment variable accepts `1`, `true`, `yes`, `on` (case-insensitive)
|
||||
- Admin UI in Metrics tab:
|
||||
- "Early Mode" section with description of functionality
|
||||
- Checkbox to disable early metrics interception
|
||||
- Environment override notice when env var is set
|
||||
- Current status indicator showing early mode state
|
||||
- **Key Learning**: Balancing compatibility vs extensibility
|
||||
- Early mode fixes memory issues but disables `wp_prometheus_collect_metrics` hook
|
||||
- Users with custom metrics need the hook, so early mode must be optional
|
||||
- Default remains enabled (safe) with explicit opt-out for advanced users
|
||||
|
||||
### 2026-02-02 - Plugin Compatibility Fix (v0.4.1)
|
||||
|
||||
- Fixed memory exhaustion (1GB limit) when wp-fedistream (Twig-based) plugin is active
|
||||
|
||||
Reference in New Issue
Block a user