Skip to content

Feat/add metrics endpoint 114#1101

Open
nancy-verma780 wants to merge 4 commits into
imDarshanGK:mainfrom
nancy-verma780:feat/add-metrics-endpoint-114
Open

Feat/add metrics endpoint 114#1101
nancy-verma780 wants to merge 4 commits into
imDarshanGK:mainfrom
nancy-verma780:feat/add-metrics-endpoint-114

Conversation

@nancy-verma780

Copy link
Copy Markdown

Description

Closes #114

Implemented a /metrics GET endpoint tracking application usage statistics using fast in-memory variables and FastAPI middleware.

Changes Made

  • Added request counter middleware tracking total hits in backend/app/main.py.
  • Implemented /metrics route returning requests, analyses, uptime, and version tracking.
  • Added comprehensive unit tests in backend/tests/test_endpoints.py.

Added middleware to collect usage metrics and a route to retrieve them.
Add test for metrics endpoint to verify response structure and values.

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@nancy-verma780 add demo

Image

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

👋 This PR has had no activity for 7 days.

Please push updates or comment if you still need more time.

Inactive PRs may be closed automatically after 7 more days.

@github-actions github-actions Bot added the stale label Jul 1, 2026
@nancy-verma780

Copy link
Copy Markdown
Author

Working on fixing the formatting, tests, and adding the demo today.

@github-actions github-actions Bot removed the stale label Jul 2, 2026

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

Add /metrics endpoint to the backend

2 participants