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

fix(kuma-cp): disable statsForAllMethods in grpc stats #5226

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

jakubdyszkiewicz
Copy link
Contributor

It does not make sense to use statsForAllMethods at this moment, because it's very common to use dots in grpc package which breaks the StatsD to Prometheus conversion.

There is a feature to replace dots with underscores, but Envoy with this feature is not yet released
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/grpc_stats/v3/config.proto#envoy-v3-api-field-extensions-filters-http-grpc-stats-v3-filterconfig-stats-for-all-methods replace_dots_in_grpc_service_name.

If someone wants to still use it, they can reenable this with ProxyTemplate.
In the future, we can reenable this when Kuma will upgrade to Envoy with replace_dots_in_grpc_service_name feature.

Changes

  • Disable statsForAllMethods
  • Add E2E test to check if gRPC client and server emits stats
  • Change the gRPC test client to be resilient to connection errors.

Checklist prior to review

  • Link to docs PR or issue -- no extra docs.
  • Link to UI issue or PR -- no
  • Is the issue worked on linked? -- gRPC stats mapping is broken #5201
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner October 27, 2022 16:00
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
@lahabana lahabana linked an issue Oct 28, 2022 that may be closed by this pull request
@lahabana
Copy link
Contributor

I doubt anyone uses grpc stats as they are atm but I think it still makes sense to add a note in UPGRADE.md.

Signed-off-by: Jakub Dyszkiewicz <[email protected]>
@jakubdyszkiewicz jakubdyszkiewicz merged commit c7adc7a into kumahq:master Oct 28, 2022
@jakubdyszkiewicz jakubdyszkiewicz deleted the grpc-stats-fix branch October 28, 2022 09:32
@lahabana lahabana mentioned this pull request Dec 13, 2022
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.

gRPC stats mapping is broken
2 participants