Initial plugin setup (v0.0.1)
Some checks failed
Create Release Package / build-release (push) Failing after 48s

- Create initial WordPress plugin structure
- Add Prometheus metrics collector with default metrics
- Implement authenticated /metrics endpoint with Bearer token
- Add license management integration
- Create admin settings page under Settings > Metrics
- Set up Gitea CI/CD pipeline for automated releases
- Add extensibility via wp_prometheus_collect_metrics hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 15:31:21 +01:00
commit 7ff87f7c8d
21 changed files with 2890 additions and 0 deletions

61
composer.json Normal file
View File

@@ -0,0 +1,61 @@
{
"name": "magdev/wp-prometheus",
"description": "WordPress Prometheus metrics endpoint with extensible hooks for custom metrics",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Marco Graetsch",
"email": "magdev3.0@gmail.com",
"homepage": "https://src.bundespruefstelle.ch/magdev"
}
],
"homepage": "https://src.bundespruefstelle.ch/magdev/wp-prometheus",
"support": {
"issues": "https://src.bundespruefstelle.ch/magdev/wp-prometheus/issues"
},
"repositories": [
{
"type": "path",
"url": "lib/wc-licensed-product-client"
}
],
"require": {
"php": ">=8.3",
"magdev/wc-licensed-product-client": "dev-main",
"promphp/prometheus_client_php": "^2.10"
},
"require-dev": {
"phpunit/phpunit": "^10.0",
"squizlabs/php_codesniffer": "^3.7",
"wp-coding-standards/wpcs": "^3.0",
"phpcompatibility/phpcompatibility-wp": "*"
},
"autoload": {
"psr-4": {
"Magdev\\WpPrometheus\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Magdev\\WpPrometheus\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.3.0"
}
},
"scripts": {
"phpcs": "phpcs",
"phpcbf": "phpcbf",
"test": "phpunit"
},
"minimum-stability": "dev",
"prefer-stable": true
}