Skip to content

[Feature Request]: Enhance Metrics Tab UI with Virtual Servers and Top 5 Performance Tables #657

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

Merged
merged 11 commits into from
Aug 10, 2025

Conversation

IrushaBasukala
Copy link
Contributor

@IrushaBasukala IrushaBasukala commented Aug 2, 2025

Enhances the Metrics Tab UI with virtual servers display and top 5 performance tables.

Key improvements:

  • Added virtual server filtering and display
  • Implemented top 5 performance tables for requests
  • Enhanced metrics visualization
  • Improved user experience in metrics dashboard

Closes #368

@crivetimihai crivetimihai added this to the Release 0.6.0 milestone Aug 4, 2025
@crivetimihai crivetimihai force-pushed the feature/metrics-tab-enhancements branch from 91d8401 to 55ba524 Compare August 9, 2025 23:41
@crivetimihai
Copy link
Member

crivetimihai commented Aug 9, 2025

Still some major Issues:

  1. Adding an SSE server results in broken tools - fixed (rebased)
  2. Export should export ALL not just top 5
  3. Not recording metrics - all show Success Rate 0.
  4. Truncate Average Response Time: to 3 decimals: 1.1898999695965489` -> 1.189

🔧 Alembic Migration Fixes:

  • Resolved migration conflicts by moving alembic to correct mcpgateway/alembic/ location
  • Cleaned up obsolete root alembic/ directory and alembic.ini
  • Fixed migration sequence and dependencies
  • All migrations now work properly for both fresh databases and upgrades

🧪 Test Suite Fixes:

  • Fixed authentication: Added missing require_auth dependency to /admin/metrics endpoint
  • Fixed SQLAlchemy syntax: Updated case() statements to use modern tuple syntax instead of deprecated list syntax across all service files:
    • tool_service.py
    • prompt_service.py
    • server_service.py
    • resource_service.py

✅ Test Results:

  • All tests now pass: 1403 passed, 10 skipped, 0 failed
  • make test command works successfully
  • 80% code coverage achieved

IrushaBasukala and others added 6 commits August 10, 2025 08:45
Signed-off-by: IrushaBasukala <[email protected]>
Signed-off-by: IrushaBasukala <[email protected]>
Signed-off-by: IrushaBasukala <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
@crivetimihai crivetimihai force-pushed the feature/metrics-tab-enhancements branch from 55ba524 to 810e7d3 Compare August 10, 2025 08:29
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
- Fixed SQLite boolean comparisons (using == 1 instead of .is_(True))
- Fixed Float type casting in SQLAlchemy queries
- Added division by zero protection
- Fixed frontend JavaScript to handle camelCase field names from API
- Added prompt metrics recording (partial - needs more work for auto-recording)
- Eliminated code duplication with shared metrics_common.py utility
- Fixed all pylint and flake8 issues

The metrics now correctly display success rates and execution counts for all entity types.

Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #699 to track remaining activities.

Completed Work (PR #657)

✅ Rebased and merged changes
✅ Added Virtual Servers to metrics display
✅ Created enhanced Top 5 Performance Tables with detailed columns
✅ Implemented tab navigation for different entity types
✅ Added responsive and mobile-friendly tables
✅ Fixed authentication dependencies and SQLAlchemy syntax
✅ Resolved Alembic migration conflicts
✅ Improved test coverage (1403 tests passing)

@crivetimihai crivetimihai merged commit 6a43a86 into IBM:main Aug 10, 2025
36 checks passed
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.

[Feature Request]: Enhance Metrics Tab UI with Virtual Servers and Top 5 Performance Tables
2 participants