Skip to content

Gate logRequest() behind debugger-only mode to reduce agent overhead#456

Open
Zakaria-Kofiro wants to merge 2 commits intomasterfrom
zkofiro/debugger-only-logging
Open

Gate logRequest() behind debugger-only mode to reduce agent overhead#456
Zakaria-Kofiro wants to merge 2 commits intomasterfrom
zkofiro/debugger-only-logging

Conversation

@Zakaria-Kofiro
Copy link
Collaborator

Gate logRequest() behind debugger-only mode to reduce agent overhead

Summary

  • Adds isDebugMode() default method to TankHttpLogger interface (returns false)
  • HttpRequestFactory overrides it to return APITestHarness.getInstance().isDebug()
  • BaseRequest.logRequest() early-returns when force=false and not in debug mode, skipping expensive string building that was happening on every request during load tests
  • Adds 3 unit tests covering the skip, force-override, and debug-mode paths

Why

logRequest() builds a full request/response string (URL, headers, body, cookies) on every HTTP call. This work is only consumed by the Tank Debugger UI — production agents were paying the cost unconditionally.

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

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