diff --git a/CHANGELOG.md b/CHANGELOG.md index 947a533..f344ebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.0] - 2026-02-02 + +### Added + +- **Prometheus Metrics Integration** - Expose FediStream metrics for monitoring + - Content metrics: `fedistream_content_total` (by type/status), `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 Prometheus metrics + - Requires WP Prometheus plugin to be active + ## [0.4.9] - 2026-02-02 ### Changed diff --git a/README.md b/README.md index dc1298a..1afd375 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Stream music over ActivityPub - Build your own music streaming platform for Musicians and Labels. -[](CHANGELOG.md) +[](CHANGELOG.md) [](https://php.net) [](https://wordpress.org) [](https://www.gnu.org/licenses/gpl-2.0.html) @@ -39,18 +39,6 @@ WP FediStream is a WordPress plugin that enables musicians, bands, and labels to - [ActivityPub Plugin](https://wordpress.org/plugins/activitypub/) - For Fediverse integration - [WooCommerce](https://woocommerce.com/) 10.0+ - For selling music -## Known Issues - -### Plugin Incompatibilities - -The following plugins are known to cause issues when used together with WP FediStream: - -| Plugin | Issue | Status | -|---------------|-------------------------------------------------------------------|---------------------| -| WP Prometheus | Memory exhaustion (PHP Fatal error) when viewing FediStream pages | Under investigation | - -If you encounter memory issues or PHP fatal errors, try deactivating these plugins temporarily to isolate the problem. - ## License Key WP FediStream requires a valid license key for frontend functionality (player, shortcodes, ActivityPub). The admin dashboard works without a license, allowing you to configure the plugin before activation. diff --git a/includes/Installer.php b/includes/Installer.php index 9be9892..fa7130a 100644 --- a/includes/Installer.php +++ b/includes/Installer.php @@ -347,6 +347,7 @@ class Installer { $defaults = array( 'wp_fedistream_enable_activitypub' => 1, 'wp_fedistream_enable_woocommerce' => 0, + 'wp_fedistream_enable_prometheus' => 0, 'wp_fedistream_audio_formats' => array( 'mp3', 'wav', 'flac', 'ogg' ), 'wp_fedistream_max_upload_size' => 50, // MB 'wp_fedistream_default_license' => 'all-rights-reserved', diff --git a/includes/Plugin.php b/includes/Plugin.php index 4b95bba..6e392d1 100644 --- a/includes/Plugin.php +++ b/includes/Plugin.php @@ -16,6 +16,7 @@ use WP_FediStream\Frontend\TemplateLoader; use WP_FediStream\Frontend\Widgets; use WP_FediStream\PostTypes\Artist; use WP_FediStream\WooCommerce\Integration as WooCommerceIntegration; +use WP_FediStream\Prometheus\Integration as PrometheusIntegration; use WP_FediStream\WooCommerce\DigitalDelivery; use WP_FediStream\WooCommerce\StreamingAccess; use WP_FediStream\PostTypes\Album; @@ -207,6 +208,11 @@ final class Plugin { new StreamingAccess(); } + // Initialize Prometheus integration. + if ( get_option( 'wp_fedistream_enable_prometheus', 0 ) && $this->is_prometheus_active() ) { + new PrometheusIntegration(); + } + // Initialize user library and notifications. new UserLibrary(); new LibraryPage(); @@ -448,6 +454,7 @@ final class Plugin { // Get current settings. $enable_activitypub = get_option( 'wp_fedistream_enable_activitypub', 1 ); $enable_woocommerce = get_option( 'wp_fedistream_enable_woocommerce', 0 ); + $enable_prometheus = get_option( 'wp_fedistream_enable_prometheus', 0 ); $max_upload_size = get_option( 'wp_fedistream_max_upload_size', 50 ); $default_license = get_option( 'wp_fedistream_default_license', 'all-rights-reserved' ); @@ -486,7 +493,7 @@ final class Plugin { $this->render_settings_tab( $max_upload_size, $default_license ); break; case 'integrations': - $this->render_integrations_tab( $enable_activitypub, $enable_woocommerce ); + $this->render_integrations_tab( $enable_activitypub, $enable_woocommerce, $enable_prometheus ); break; } ?> @@ -525,6 +532,7 @@ final class Plugin { case 'integrations': update_option( 'wp_fedistream_enable_activitypub', isset( $_POST['enable_activitypub'] ) ? 1 : 0 ); update_option( 'wp_fedistream_enable_woocommerce', isset( $_POST['enable_woocommerce'] ) ? 1 : 0 ); + update_option( 'wp_fedistream_enable_prometheus', isset( $_POST['enable_prometheus'] ) ? 1 : 0 ); echo '
' . esc_html__( 'Integration settings saved.', 'wp-fedistream' ) . '