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

feat: pprof profiling and monitoring system #157

Open
wants to merge 3 commits into
base: main-internal
Choose a base branch
from

Conversation

juniormp
Copy link
Collaborator

@juniormp juniormp commented Mar 4, 2024

Description

It creates a new domain (monitoring) that introduces:

  • Memory monitoring section (stats) to track memory usage and perform a graceful service restart when memory usage exceeds a defined threshold. The goal is to ensure the stability and reliability of the application by proactively managing memory resources.
  • Profiling capabilities (pprof) to monitor various aspects of the program's runtime performance. The Profile struct allows users to enable or disable profiling, specify the frequency of profile collection, and track goroutine and heap profiles. The goal is to provide insights into the program's runtime behavior, aiding in performance optimization and debugging.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Tested in toronto-1 and toronto-4.

  • Generating pprof profiles with isEnable and delayInSeconds flag.
  • Heap memory stress test with application restart.

@juniormp juniormp marked this pull request as ready for review March 4, 2024 19:07
@juniormp juniormp requested a review from dankostiuk March 4, 2024 19:07
@juniormp juniormp self-assigned this Mar 4, 2024
@juniormp juniormp added the enhancement New feature or request label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant