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

Backport of docs: fix the description of client rpc into release/1.15.x #18212

Conversation

hc-github-team-consul-core
Copy link
Contributor

Backport

This PR is auto-generated from #18206 to be assessed for backporting due to the inclusion of the label backport/1.15.

The below text is copied from the body of the original PR.


Description

The metric consul.client.rpc is applicable to consul server as well, so remove in client mode in the metric description, which makes it sounds like client agent only.

consul/agent/consul/server.go

Lines 1802 to 1818 in ada767f

func (s *Server) RPC(ctx context.Context, method string, args interface{}, reply interface{}) error {
remoteAddr, _ := RemoteAddrFromContext(ctx)
codec := &inmemCodec{
method: method,
args: args,
reply: reply,
sourceAddr: remoteAddr,
}
// Enforce the RPC limit.
//
// "client" metric path because the internal client API is calling to the
// internal server API. It's odd that the same request directed to a server is
// recorded differently. On the other hand this possibly masks the different
// between regular client requests that traverse the network and these which
// don't (unless forwarded). This still seems most reasonable.
metrics.IncrCounter([]string{"client", "rpc"}, 1)

Testing & Reproduction steps

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core requested a review from a team as a code owner July 20, 2023 20:34
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/doc-fix-metrics-description-rpc-client/partly-welcome-jawfish branch from 1ce20ea to 0e096b0 Compare July 20, 2023 20:34
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/doc-fix-metrics-description-rpc-client/partly-welcome-jawfish branch from 1269221 to fadf5b7 Compare July 20, 2023 20:34
@github-actions github-actions bot added the type/docs Documentation needs to be created/updated/clarified label Jul 20, 2023
Copy link

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@hc-github-team-consul-core
Copy link
Contributor Author

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

@vercel vercel bot temporarily deployed to Preview – consul-ui-staging July 20, 2023 20:38 Inactive
@vercel vercel bot temporarily deployed to Preview – consul July 20, 2023 20:45 Inactive
@huikang huikang closed this Jul 20, 2023
auto-merge was automatically disabled July 20, 2023 20:48

Pull request was closed

@huikang huikang reopened this Aug 3, 2023
@huikang huikang enabled auto-merge (squash) August 3, 2023 22:37
@huikang huikang merged commit 6ba25f7 into release/1.15.x Aug 3, 2023
104 checks passed
@huikang huikang deleted the backport/doc-fix-metrics-description-rpc-client/partly-welcome-jawfish branch August 3, 2023 22:54
@jira jira bot mentioned this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants