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

Enhancement: Expose Response Headers and Rate Limit Metrics, Efficiency Logging #120

Closed
wants to merge 10 commits into from

Conversation

mecfletcher
Copy link

This pull request introduces an array of updates aimed at providing greater visibility for response-level information and optimizing processing efficiency. Key enhancement details include the following:

Additions:

  1. setResponseHeaders and getResponseHeaders methods have been implemented to allow the storage of response headers.
  2. setRateLimitInfo, getRateLimitInfo, and hydrateRateLimitInfo methods have been implemented to provide visibility of rate-limiting information.
  3. setProcessingMs, getProcessingMs, and hydrateProcessingMs methods have been implemented to monitor processing time in milliseconds.
  4. setHeaderFunction method has been implemented to manage header formatting and assignment.

Refactoring:

  1. Existing methods have been refactored to accommodate the setHeaderFunction method and to hydrate the rate limiting and processing info after every request.

These changes will assist in monitoring usage, complying with rate-limits, and optimizing processing speed. Further testing and feedback are appreciated.

Commit log:

  • Provide access to responseHeaders
  • Add processingMs and cleanup
  • Cleanup sub-indexing
  • Implement isset
  • Fix indexing
  • Refactor to setHeaderMethod and error_log for test
  • Fix key values for rate limit headers
  • Cleanup

@orhanerday
Copy link
Owner

Hi @mecfletcher

Why did you close the PR?

@mecfletcher
Copy link
Author

Hey @orhanerday Sorry I had a basic bug that I just fixed, creating a new PR now!

@orhanerday
Copy link
Owner

Hey @orhanerday Sorry I had a basic bug that I just fixed, creating a new PR now!

Thanks! I'm looking forward.

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