You've already forked wp-fedistream
docs: Update CLAUDE.md with v0.5.0/v0.5.1 session history
- Added Prometheus metrics integration documentation - Added localhost license bypass documentation - Updated memory leak status to resolved (fixed in WP Prometheus) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
53
CLAUDE.md
53
CLAUDE.md
@@ -606,4 +606,55 @@ wp-fedistream/
|
|||||||
- WordPress hook system (class-wp-hook.php) can itself be the recursion point
|
- WordPress hook system (class-wp-hook.php) can itself be the recursion point
|
||||||
- The interaction between FediStream and WP Prometheus appears to be at a fundamental WordPress level
|
- The interaction between FediStream and WP Prometheus appears to be at a fundamental WordPress level
|
||||||
|
|
||||||
**Status:** UNRESOLVED - Documented as known incompatibility, investigation to continue later
|
**Status:** RESOLVED - Issue was fixed in WP Prometheus plugin, removed from known incompatibilities
|
||||||
|
|
||||||
|
### 2026-02-02 - Prometheus Metrics & License Bypass v0.5.0/v0.5.1
|
||||||
|
|
||||||
|
**Summary:** Added Prometheus metrics integration and localhost license bypass for development.
|
||||||
|
|
||||||
|
**v0.5.0 - Prometheus Metrics Integration:**
|
||||||
|
|
||||||
|
- Created `includes/Prometheus/Integration.php` with comprehensive metrics collection
|
||||||
|
- Content metrics: `fedistream_content_total`, `fedistream_genres_total`, `fedistream_moods_total`
|
||||||
|
- Engagement metrics: `fedistream_plays_total`, `fedistream_plays_today`, `fedistream_favorites_total`, `fedistream_local_follows_total`, `fedistream_listening_history_entries`
|
||||||
|
- User metrics: `fedistream_users_with_library`, `fedistream_users_following_artists`, `fedistream_notifications_total`, `fedistream_notifications_pending`
|
||||||
|
- WooCommerce metrics (conditional): `fedistream_purchases_total`, `fedistream_customers_total`, `fedistream_products_total`
|
||||||
|
- ActivityPub metrics (conditional): `fedistream_activitypub_followers_total`, `fedistream_activitypub_followers_by_artist`, `fedistream_activitypub_reactions_total`
|
||||||
|
- New setting in Integrations tab to enable/disable
|
||||||
|
- Uses `wp_prometheus_collect_metrics` action hook
|
||||||
|
|
||||||
|
**v0.5.1 - Localhost License Bypass:**
|
||||||
|
|
||||||
|
- Added `is_localhost()` method to License Manager
|
||||||
|
- Bypasses license check on: `localhost`, `127.0.0.1`, `::1`
|
||||||
|
- Also bypasses for TLDs: `.local`, `.test`, `.localhost`, `.dev.local`
|
||||||
|
- Allows full plugin functionality during local development
|
||||||
|
|
||||||
|
**Files Created:**
|
||||||
|
|
||||||
|
- `includes/Prometheus/Integration.php` - Metrics collection class
|
||||||
|
- `includes/Prometheus/index.php` - Security file
|
||||||
|
|
||||||
|
**Files Modified:**
|
||||||
|
|
||||||
|
- `includes/Plugin.php` - Added Prometheus integration, settings toggle, `is_prometheus_active()` method
|
||||||
|
- `includes/Installer.php` - Added `wp_fedistream_enable_prometheus` default option
|
||||||
|
- `includes/License/Manager.php` - Added `is_localhost()` method, bypass in `is_license_valid()`
|
||||||
|
- `README.md` - Removed known incompatibility section, updated version badge
|
||||||
|
|
||||||
|
**Integration Pattern:**
|
||||||
|
|
||||||
|
Follows same pattern as WooCommerce/ActivityPub integrations:
|
||||||
|
|
||||||
|
```php
|
||||||
|
if (get_option('wp_fedistream_enable_prometheus', 0) && $this->is_prometheus_active()) {
|
||||||
|
new PrometheusIntegration();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
|
|
||||||
|
- WP Prometheus memory leak issue was fixed in WP Prometheus itself
|
||||||
|
- Metrics use simple COUNT queries for performance
|
||||||
|
- ActivityPub followers limited to top 10 to avoid cardinality explosion
|
||||||
|
- Default disabled (opt-in via Settings > Integrations)
|
||||||
|
|||||||
Reference in New Issue
Block a user