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: convert Dynamo stats to use StatName interface #7634

Merged
merged 12 commits into from
Jul 24, 2019

Conversation

jmarantz
Copy link
Contributor

@jmarantz jmarantz commented Jul 18, 2019

Description: I started off thinking I would try to knock off a bunch of the places where we compute stats by name in one go, but Dynamo deserves its own PR mostly; there's one unrelated file in it. If this goes in first we should remove the whitelist entry in #7573 and if that goes in first then we should merge that in and remove the entry before checking this one in.

This is another step toward resolving #4196 and enabling submission of #4980.

Risk Level: medium -- could introduce lock contention for stats associated with status-codes and table-names. This PR may need more work because of that. Note that #7008 offers a solution to this problem; it's just not clear yet whether it's worth the cost until we see perf traces.
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a

@jmarantz jmarantz changed the title WiP: convert Dynamo stats to use StatName interface stats: convert Dynamo stats to use StatName interface Jul 18, 2019
@jmarantz jmarantz marked this pull request as ready for review July 18, 2019 18:28
@zuercher
Copy link
Member

/assign @mattklein123

Feel free to reassign -- just looks like you're the one of the few people who's touched the logic in here.

@jmarantz
Copy link
Contributor Author

OK this is ready for a look -- I removed dynamo_stats_filter from the whitelist established in #7573 .

Feel free to push back on the potential lookup-by-name in the request-path if you think it's an issue, and we can discuss how to resolve.

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, cool stuff. Flushing out some comments from a first pass and then will take another look. Thank you!

/wait

source/extensions/filters/http/dynamo/config.cc Outdated Show resolved Hide resolved
source/extensions/filters/http/dynamo/dynamo_filter.h Outdated Show resolved Hide resolved
source/extensions/filters/http/dynamo/dynamo_stats.cc Outdated Show resolved Hide resolved
source/extensions/filters/http/dynamo/dynamo_stats.cc Outdated Show resolved Hide resolved
}

Stats::StatName DynamoStats::getStatName(const std::string& str) {
// We have been presented with a string to when composing a stat. The Dynamo
Copy link
Member

Choose a reason for hiding this comment

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

can't parse. rephrase?

jmarantz added 2 commits July 23, 2019 12:37
Signed-off-by: Joshua Marantz <[email protected]>
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, LGTM with 2 small comments.

/wait

source/extensions/filters/http/dynamo/dynamo_filter.cc Outdated Show resolved Hide resolved
source/extensions/filters/http/dynamo/dynamo_stats.h Outdated Show resolved Hide resolved
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.

Nice, thanks.

@jmarantz
Copy link
Contributor Author

Thanks for the review & catching some unneeded stuff.

@jmarantz jmarantz merged commit a384ff1 into envoyproxy:master Jul 24, 2019
@jmarantz jmarantz deleted the dynamo_stats branch July 24, 2019 23:03
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.

3 participants