Skip to content

Conversation

@Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Jan 31, 2023

Proposed changes

This PR implements a new flag -max-size to control the maximum length of exported request/response to elastic

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Jan 31, 2023
@Mzack9999 Mzack9999 self-assigned this Jan 31, 2023
@Mzack9999 Mzack9999 marked this pull request as draft January 31, 2023 15:06
@Mzack9999 Mzack9999 linked an issue Jan 31, 2023 that may be closed by this pull request
@Mzack9999 Mzack9999 marked this pull request as ready for review January 31, 2023 16:40
@Mzack9999 Mzack9999 requested a review from xm1k3 February 14, 2023 14:37
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mzack9999 any advantages of using -elastic-max-field-size over the common flag that will be applicable for all the exports and not specific to elastic?

   -rsts, -response-size-to-save int  max response size to save in bytes (default 2147483647)
   -rstr, -response-size-to-read int  max response size to read in bytes (default 2147483647)

@Mzack9999
Copy link
Member Author

Both flags don't make sense within an http proxy as we need to read and process always the whole requests/responses. I've renamed the flag to max-size under the export section, and now the data saved is always truncated at the maximum size if specified

@Mzack9999 Mzack9999 requested review from ehsandeep and tarunKoyalwar and removed request for xm1k3 February 24, 2023 16:05
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

@ehsandeep ehsandeep merged commit 4b91321 into dev Feb 26, 2023
@ehsandeep ehsandeep deleted the issue-214-save-response-size branch February 26, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement Most issues will probably ask for additions or changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to control response body to save / read

5 participants