Skip to content

stats: add histograms for request/response headers and body sizes#11559

Merged
htuch merged 47 commits intoenvoyproxy:masterfrom
ranjithkumar007:headers
Jul 21, 2020
Merged

stats: add histograms for request/response headers and body sizes#11559
htuch merged 47 commits intoenvoyproxy:masterfrom
ranjithkumar007:headers

Conversation

@ranjithkumar007
Copy link
Copy Markdown
Contributor

@ranjithkumar007 ranjithkumar007 commented Jun 11, 2020

Signed-off-by: Ranjith Kumar [email protected]

Commit Message: stats: add histograms for request/response headers and body sizes
Additional Description: Created a new struct for optional cluster stats. Moved timeout budget stats and added request response headers and body stats in the new struct.
Risk Level: Low
Testing: Added test cases
Docs Changes: added
Release Notes: added
Fixes #10308 , Fixes #3621

@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

PTAL @nezdolik

Copy link
Copy Markdown
Member

@nezdolik nezdolik left a comment

Choose a reason for hiding this comment

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

LGTM apart from few nits. Let's proceed and add tests.

@ranjithkumar007 ranjithkumar007 force-pushed the headers branch 3 times, most recently from 8bad27f to 425411e Compare June 23, 2020 14:27
@ranjithkumar007 ranjithkumar007 marked this pull request as ready for review June 24, 2020 09:14
@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

All checks have passed. PTAL @nezdolik

Copy link
Copy Markdown
Member

@nezdolik nezdolik left a comment

Choose a reason for hiding this comment

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

(Updated) Nvm i see that docs have been updated

@nezdolik
Copy link
Copy Markdown
Member

After brief discussion with @jmarantz, proposed histogram should be enabled by config flag, as it is expensive to track histogram per cluster with large number of clusters. @ranjithkumar007 here is example of histogram controlled by config flag: #9227

@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

ranjithkumar007 commented Jun 26, 2020

here is example of histogram controlled by config flag: #9227

Thanks @nezdolik . So, we need a new entry in cluster config.
I was wondering how to add such entry that would fit well for #11766 as well.
Should we have seperate entries like track_upstream_rq_headers_size, track_upstream_rq_body_size ? or a dict like track_upstream_rq_stats : {'headers_size': true, 'body_size' : false}?

@nezdolik
Copy link
Copy Markdown
Member

Think the first approach is preferred.

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #11559 was synchronize by ranjithkumar007.

see: more, trace.

Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Ranjith Kumar <[email protected]>
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Looks pretty good, just got a few style nits.

@envoyproxy/api-shepherds for API review

Signed-off-by: Ranjith Kumar <[email protected]>
@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

@jmarantz There is a decline of 256 bytes in memory usage per cluster. On master it is 45003. On this PR it shows 44747.

@jmarantz
Copy link
Copy Markdown
Contributor

Awesome; one last regold away from passing release tests. Since you changed an existing large structure from absl::optional to unique_ptr, the memory reduction makes sense to me.

Nice job! Fix CI and this LGTM.

@htuch
Copy link
Copy Markdown
Member

htuch commented Jul 20, 2020

/lgtm api

@jmarantz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

jmarantz
jmarantz previously approved these changes Jul 20, 2020
@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

ranjithkumar007 commented Jul 20, 2020

hds_integration_test is timing out again on tsan. Possibly a flaky test.

@jmarantz
Copy link
Copy Markdown
Contributor

/azp run

RE hds_integration_test timing out...not clear whether this is just death by 3 seconds/test-method * lots of test methods, or something is getting stuck. Hopefully we'll catch a faster machine on this run.

@azure-pipelines
Copy link
Copy Markdown

Command 'run

RE' is not supported by Azure Pipelines.



Supported commands

  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@nezdolik
Copy link
Copy Markdown
Member

PR lgtm apart from the point of adding back docs for deprecated field.

@nezdolik
Copy link
Copy Markdown
Member

nezdolik commented Jul 21, 2020

Looks like hds flaky test is the reason of failing CI, @ranjithkumar007 could you try to retrigger CI with /retest comment?

@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

Looks like hds flaky test is the reason of failing CI, @ranjithkumar007 could you try to retrigger CI with /retest comment?

Yeah, I will do it once I update the docs.

Signed-off-by: Ranjith Kumar <[email protected]>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@htuch htuch merged commit a24c95e into envoyproxy:master Jul 21, 2020
@ranjithkumar007
Copy link
Copy Markdown
Contributor Author

Thanks everyone! Good to have first contribution to envoy merged 😀 .

KBaichoo pushed a commit to KBaichoo/envoy that referenced this pull request Jul 30, 2020
…voyproxy#11559)

Created a new struct for optional cluster stats. Moved timeout budget stats and added request response headers and body stats in the new struct.

Risk Level: Low
Testing: Added test cases
Docs Changes: added
Release Notes: added

Fixes envoyproxy#10308 , Fixes envoyproxy#3621

Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: Kevin Baichoo <[email protected]>
scheler pushed a commit to scheler/envoy that referenced this pull request Aug 4, 2020
…voyproxy#11559)

Created a new struct for optional cluster stats. Moved timeout budget stats and added request response headers and body stats in the new struct.

Risk Level: Low
Testing: Added test cases
Docs Changes: added
Release Notes: added

Fixes envoyproxy#10308 , Fixes envoyproxy#3621

Signed-off-by: Ranjith Kumar <[email protected]>
Signed-off-by: scheler <[email protected]>
@ranjithkumar007 ranjithkumar007 deleted the headers branch August 12, 2020 16:48
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.

Feature request: Histogram for header sizes Feature request: statistics on request and response body size

6 participants