Skip to content
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

Feature/telemetry usage endpoint #58

Merged
merged 26 commits into from
Jan 15, 2025
Merged

Conversation

sametd
Copy link
Member

@sametd sametd commented Jan 14, 2025

This PR enhances the telemetry service and introduces new features, including:

  • New /metrics Endpoint: Displays usage statistics for better monitoring.
  • Helper Functions for Handlers: Simplifies code and improves reusability.
  • Consistent Logging: Uvicorn logs now follow the Polytope logging format.
  • Separate Metrics Task for Garbage Collector: Improves task organization.
  • Retention of Processed Metrics: Processed metrics are kept by default, even when requests are removed.
  • API Key Obfuscation: Enhances security by hiding API keys in logs and metrics.
  • User ID in Metrics: Adds user ID to metrics for better tracking.
  • Improved Store Initialisation: Garbage collector now initialises the request and metric stores together.

Copy link
Collaborator

@peshence peshence left a comment

Choose a reason for hiding this comment

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

Couple of very minor comments, it looks great! Especially appreciate the little things like not repeating the shared portion of the path

polytope_server/telemetry/handlers.py Show resolved Hide resolved
polytope_server/telemetry/handlers.py Show resolved Hide resolved
@sametd sametd merged commit 0c53653 into develop Jan 15, 2025
5 checks passed
@peshence peshence deleted the feature/telemetry-usage-endpoint branch January 16, 2025 10:24
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.

2 participants