Skip to content

feat: Prometheus metrics enhancements - #173

Closed
rubenvdlinde wants to merge 4 commits into
developmentfrom
feature/152/prometheus-metrics
Closed

feat: Prometheus metrics enhancements#173
rubenvdlinde wants to merge 4 commits into
developmentfrom
feature/152/prometheus-metrics

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Closes #152

Summary

Added @SPEC PHPDoc tags for traceability to the prometheus-metrics implementation. The controllers and tests already implement all requirements: Nextcloud version label in the info gauge, procest_cases_created_today metric, APCu caching with 30s TTL for expensive queries, and OpenRegister dependency check with hard failure status.

Spec Reference

Changes

  • lib/Controller/MetricsController.php — Added @SPEC tags to collectMetrics() and getCached() methods (tasks T01-T03)
  • lib/Controller/HealthController.php — Added @SPEC tags to index() and checkOpenRegister() methods (task T04)
  • tests/Unit/Controller/MetricsControllerTest.php — Added @SPEC tag to test class (task T05)
  • tests/Unit/Controller/HealthControllerTest.php — Added @SPEC tag to test class (task T06)

Test Coverage

  • tests/Unit/Controller/MetricsControllerTest.php — Covers info gauge labels, cases_created_today metric, database health, and metric format
  • tests/Unit/Controller/HealthControllerTest.php — Covers healthy system, OpenRegister unavailability, database errors, and version info

Implementation Status

All tasks from the spec are already implemented:

  • ✓ T01: Nextcloud version label in procest_info gauge
  • ✓ T02: procest_cases_created_today metric
  • ✓ T03: APCu caching with 30s TTL
  • ✓ T04: OpenRegister dependency check (hard failure)
  • ✓ T05: MetricsController unit tests (4 test methods)
  • ✓ T06: HealthController unit tests (4 test methods)

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ 81d5157

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer
npm
PHPUnit
Newman
Playwright

Quality workflow — 2026-04-16 11:26 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ a4618c9

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-04-16 11:28 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ b4ae164

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-04-18 21:59 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ 960b50a

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-04-20 10:12 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Closed as part of the 2026-05-10 hydra pipeline backlog drain (second pass). The underlying spec lives at openspec/changes// on development and has drifted from this PR's content since it was opened. If still wanted, the next hydra pipeline run will regenerate fresh from the current spec.

@rubenvdlinde
rubenvdlinde deleted the feature/152/prometheus-metrics branch May 11, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant