juspay/hyperswitch

[ENHANCEMENT] Implement Metrics framework to be used in the locker

Open

#6,178 opened on Nov 7, 2023

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (42,690 stars) (4,676 forks)batch import
hacktoberfesthelp wanted

Description

📝 Feature Description We need to implement a metrics framework for the locker to track its health, liveliness, and usage. This framework should provide comprehensive insights into the locker's performance and operational status without significantly impacting the application's primary functions.

The metrics implementation should:

  1. Cover key aspects of the locker's operation, including health, liveliness, and usage.
  2. Use either Prometheus metrics or OpenTelemetry.
  3. Have minimal performance overhead on the running application.
  4. Not adversely affect the performance, availability, or functionality of the primary application.

🔨 Possible Implementation

  1. Evaluate Prometheus metrics and OpenTelemetry to determine the most suitable option for our needs.
  2. Identify key metrics to be tracked (e.g., request rate, response times, error rates, resource utilization).
  3. Implement the chosen metrics framework (Prometheus or OpenTelemetry) within the locker application.
  4. Add instrumentation points throughout the codebase to collect relevant metrics.
  5. Set up a metrics endpoint or export mechanism for data collection.
  6. Implement health check endpoints that reflect the overall status of the locker.
  7. Create dashboards or visualization tools to display the collected metrics.
  8. Develop alerting mechanisms for critical metric thresholds.

🔖 Note:

  • Performance is a critical consideration. Conduct thorough testing to ensure that the metrics collection does not significantly impact the locker's performance or resource utilization.
  • Consider implementing sampling or aggregation techniques to reduce the overhead of metrics collection.
  • Ensure that sensitive information is not exposed through the metrics.
  • Document all implemented metrics, their meanings, and recommended thresholds for monitoring.
  • Consider future scalability when designing the metrics framework.

Submission Process:

  • Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
  • Once assigned, submit a pull request (PR).
  • Maintainers will review and provide feedback, if any.
  • Maintainers can unassign issues due to inactivity, read more here.
  • For this issue, please raise a PR to juspay/hyperswitch-card-vault.

Refer here for Terms and conditions for the contest.

Contributor guide