Skip to content

fix: disable Apitally body logging to reduce memory growth#278

Open
CrazyTodd-one wants to merge 1 commit intoopenclimatefix:mainfrom
CrazyTodd-one:neva/fix-issue-276
Open

fix: disable Apitally body logging to reduce memory growth#278
CrazyTodd-one wants to merge 1 commit intoopenclimatefix:mainfrom
CrazyTodd-one:neva/fix-issue-276

Conversation

@CrazyTodd-one
Copy link
Copy Markdown

Pull Request

Description

Disable Apitally request/response body logging to reduce memory growth (#276).

The ApitallyMiddleware was buffering full request and response bodies in memory for every API call. For forecast endpoints returning multi-MB payloads, this accumulates ~250MB/day.

Changes:

  • log_request_body: True → False
  • log_response_body: True → False
  • capture_logs: True → False

Request logging and header logging remain enabled.

Note: The InMemoryBackend() cache on line 171 is also unbounded — consider a bounded cache or Redis backend as a follow-up.

How Has This Been Tested?

  • Reviewed Apitally SDK source — defaults are already False
  • Verified no tests depend on body logging
  • CI tests

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

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.

1 participant