Skip to content

mongo_proxy: support configurable command list for metrics#13494

Merged
mattklein123 merged 6 commits intoenvoyproxy:masterfrom
bartle-stripe:bartle-mongo_proxy-configurable-commands
Oct 13, 2020
Merged

mongo_proxy: support configurable command list for metrics#13494
mattklein123 merged 6 commits intoenvoyproxy:masterfrom
bartle-stripe:bartle-mongo_proxy-configurable-commands

Conversation

@bartle-stripe
Copy link
Contributor

@bartle-stripe bartle-stripe commented Oct 11, 2020

Commit Message: mongo_proxy: support configurable command list for metrics

Additional Description:

  • This additionally removes query from the default list of commands, since that's not actually a MongoDB command. I'm not sure why it was ever added, but we never see any query command metrics (not be to be confused with the separate query namespace).
  • Hardcoding aliases (findandmodify => findAndModify, etc...) seems reasonable, and doesn't make sense to be configurable, because these aliases only exist for historical reasons, and newer MongoDB commands (afaik) don't have such aliases.

Risk Level: Low

Testing: Updated tests and tested internally at Stripe.

Docs Changes: Updated mongo_proxy config docs to mention new commands field.

Release Notes: mongo_proxy: the list of commands to produce metrics for is now configurable.

Fixes #13448

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy[\w/]*/(v1alpha\d?|v1|v2alpha\d?|v2))|(api/envoy/type/(matcher/)?\w+.proto).
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: #13494 was opened by bartle-stripe.

see: more, trace.

@bartle-stripe bartle-stripe force-pushed the bartle-mongo_proxy-configurable-commands branch 3 times, most recently from 32becca to 22721a0 Compare October 11, 2020 10:13
@mattklein123 mattklein123 self-assigned this Oct 11, 2020
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.

Looks great, thanks! Just a few small comments.

/wait

Copy link
Member

Choose a reason for hiding this comment

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

v2 is locked/deprecated, so please remove these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, so I originally didn't include v2 in this change but I got test failures locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Specifically, a segfault in what looked to be an attempt to convert v3 into v2 config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anyway, removed, hopefully CI passes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good, I think I might have been testing this change internally on an older git commit.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a release note.

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.

Copy link
Member

Choose a reason for hiding this comment

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

I don't see a release note? Please also ref link to this field. You will need to merge main to pick up the CI change for docs also.

/wait

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, should be there now.

Fixes envoyproxy#13448

Signed-off-by: David Bartley <bartle@stripe.com>
@bartle-stripe bartle-stripe force-pushed the bartle-mongo_proxy-configurable-commands branch from 909674e to ad9cdee Compare October 11, 2020 21:11
@mattklein123
Copy link
Member

(Friendly request to please never force push. It makes reviews much more difficult. Thank you!)

Signed-off-by: David Bartley <bartle@stripe.com>
Signed-off-by: David Bartley <bartle@stripe.com>
@bartle-stripe bartle-stripe force-pushed the bartle-mongo_proxy-configurable-commands branch from dce2228 to fd09ca3 Compare October 12, 2020 16:59
@mattklein123
Copy link
Member

@bartle-stripe please stop force pushing! Thanks!

@bartle-stripe
Copy link
Contributor Author

bartle-stripe commented Oct 12, 2020

Sorry, the instructions on the DCO check told me to force push my last commit because I didn't include Signed-off-by.

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.

LGTM with small nit, thanks!

/wait

if (proto_config.commands_size() > 0) {
commands =
std::vector<std::string>(proto_config.commands().begin(), proto_config.commands().end());
;
Copy link
Member

Choose a reason for hiding this comment

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

nit: errant ';'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed!

Signed-off-by: David Bartley <bartle@stripe.com>
mattklein123
mattklein123 previously approved these changes Oct 12, 2020
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!

@mattklein123
Copy link
Member

Apologies this will need another main merge.

/wait

Signed-off-by: David Bartley <bartle@stripe.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!

@mattklein123 mattklein123 merged commit 7857873 into envoyproxy:master Oct 13, 2020
@bartle-stripe bartle-stripe deleted the bartle-mongo_proxy-configurable-commands branch October 13, 2020 01:31
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 14, 2020
* master: (22 commits)
  http: using CONNECT_ERROR for HTTP/2 (envoyproxy#13519)
  listener: respect address.pipe.mode (it didn't work) (envoyproxy#13493)
  examples: Fix more deprecations/warnings in configs (envoyproxy#13529)
  overload: tcp connection refusal overload action (envoyproxy#13311)
  tcp: towards pluggable upstreams (envoyproxy#13331)
  conn_pool: fixing comments (envoyproxy#13520)
  Prevent SEGFAULT when disabling listener (envoyproxy#13515)
  Convert overload manager config literals to YAML (envoyproxy#13518)
  Fix runtime feature variable name (envoyproxy#13533)
  dependencies: refactor repository location schema utils, cleanups. (envoyproxy#13452)
  router:  fix an invalid ASSERT when encoding metadata frames in the router. (envoyproxy#13511)
  http2: Proactively disconnect connections flooded when resetting stream (envoyproxy#13482)
  ci use azp to sync filter example (envoyproxy#13501)
  mongo_proxy: support configurable command list for metrics (envoyproxy#13494)
  http local rate limit: note token bucket is shared (envoyproxy#13525)
  wasm/extensions: Wasm extension policy. (envoyproxy#13526)
  http: removing envoy.reloadable_features.http1_flood_protection (envoyproxy#13508)
  build: update ppc64le CI build status shield (envoyproxy#13521)
  dependencies: enforce dependency shepherd sign-off via RepoKitteh. (envoyproxy#13522)
  Add no_traffic_healthy_interval (envoyproxy#13336)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mongo_proxy: support configurable command list for metrics

2 participants