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

stats: Remember recent lookups and display them in an admin endpoint #8116

Merged
merged 69 commits into from
Oct 17, 2019

Conversation

jmarantz
Copy link
Contributor

@jmarantz jmarantz commented Sep 2, 2019

Description: Adds an admin endpoint to show recent lookups. This blocks #4980 .
Risk Level: medium -- this does add overhead when creating new StatNames.
Testing: //test/...
Docs Changes: yes, in the PR.
Release Notes: in the PR.
Fixes: #8035

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz changed the title WiP stats: Remember recent lookups WiP stats: Remember recent lookups and display them in an admin endpoint Sep 2, 2019
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz changed the title WiP stats: Remember recent lookups and display them in an admin endpoint stats: Remember recent lookups and display them in an admin endpoint Sep 6, 2019
@jmarantz jmarantz marked this pull request as ready for review September 6, 2019 20:29
@jmarantz
Copy link
Contributor Author

jmarantz commented Sep 6, 2019

This is ready for a round of review, though I realize I may need to work a little more on the stats.md doc.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz
Copy link
Contributor Author

I have an un-pushed change on top of this that adds logging. The extra code is small (~ 300 lines) but the implication is risk of spamming logs.

Currently I have this set to dump the remembered (10) recent lookups for the last 5 minutes, at most once every 5 minutes. I am wondering if that should be flag-controlled and if therefore we should review this as is, and then let the logging addition be a follow-up.

I'm also thinking that a config API to add builtin stat-names would make any reports in those logs actionable by Envoy users without having to make code changes. Maybe that should all be integrated into this one PR? WDTY?

@stale
Copy link

stale bot commented Oct 11, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Oct 11, 2019
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Oct 14, 2019
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…r to gauge.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…k for this!

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: docs (failed build)

🐱

Caused by: a #8116 (comment) was created by @jmarantz.

see: more, trace.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks this looks great, just some small nits.

/wait

but in response to user requests on high core-count machines, this
can cause performance issues due to mutex contention.

This option requires Envoy to be started with `use-fake-symbol-table 0`.
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think you can use an :option ref link here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done; thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I backed this out, as use-fake-symbol-table is not docced, as it was meant to be temporary.

.. http:post:: /stats/recentlookups/clear

Clears all outstanding lookups and counts. If called when recent lookup
collection is enabled, this clears all the, but collection
Copy link
Member

Choose a reason for hiding this comment

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

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, and I simplified this, as I don't think it adds anything to the paragraph to discuss the two different cases.

commit coming.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

@jmarantz jmarantz merged commit 39c323d into envoyproxy:master Oct 17, 2019
@jmarantz jmarantz deleted the remember-recent-lookups branch October 17, 2019 01:31
nandu-vinodan pushed a commit to nandu-vinodan/envoy that referenced this pull request Oct 17, 2019
…nvoyproxy#8116)

* stats: Remember recent lookups and display them in an admin endpoint 

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stats: add symbol-table contention logging and admin endpoint
2 participants