-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor metrics system to configuration-driven architecture #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: AlphaGameDeveloper <77273893+AlphaGameDeveloper@users.noreply.github.com>
- Add MetricConfiguration interface for self-describing metrics - Create MetricRegistry for centralized metric configuration management - Implement configuration-driven Prometheus exporter - Add comprehensive tests for MetricRegistry - Create documentation for adding new metrics - Eliminate large switch statement in prometheus exporter - Reduce new metric addition from 5+ file changes to 2-3 Co-authored-by: AlphaGameDeveloper <77273893+AlphaGameDeveloper@users.noreply.github.com>
Coverage reportCaution Test run failed
Show new covered files 🐣
Test suite run failedFailed tests: 7/65. Failed suites: 1/9.Report generated by 🧪jest coverage report action from 65d0d98 |
|
@copilot The problem here seems to be the fact that it is looking in The tests that were not successful in CI were, specifically: These:This issue seems to only happen when it was ran using the |
The metrics system required changes across 5+ files to add a new metric type, with tight coupling between metric definitions and a 100+ line switch statement in the Prometheus exporter.
Changes
New Configuration Infrastructure
MetricConfigurationinterface: Self-describing metric definitions with Prometheus metadata and data processing logicMetricRegistry: Centralized registry managing metric configurationsmetricConfigurations.ts: Single file containing all 14 metric definitionsRefactored Prometheus Exporter
Developer Experience
ADDING_METRICS.mdwith usage guideMetricRegistryExample: Adding a New Metric
Before (5-6 file changes):
After (2-3 file changes):
Impact
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io/usr/local/bin/node /home/REDACTED/work/AlphaGameBotJS/AlphaGameBotJS/node_modules/prisma/build/child {"product":"prisma","version":"6.19.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-16T16:37:05Z","project_hash":"043ef723","cli_path":"/home/REDACTED/work/AlphaGameBotJS/AlphaGameBotJS/node_modules/.bin/prisma","cli_path_hash":"c67e5c4f","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["mysql"],"schema_preview_features":[],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-c67e5c4f","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/AlphaGameBotJS/AlphaGameBotJS/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.