Skip to content

Backport of docs: fix the description of client rpc into release/1.16.x#18213

Merged
hc-github-team-consul-core merged 1 commit into
release/1.16.xfrom
backport/doc-fix-metrics-description-rpc-client/manually-sweet-mink
Jul 20, 2023
Merged

Backport of docs: fix the description of client rpc into release/1.16.x#18213
hc-github-team-consul-core merged 1 commit into
release/1.16.xfrom
backport/doc-fix-metrics-description-rpc-client/manually-sweet-mink

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

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

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:35
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/doc-fix-metrics-description-rpc-client/manually-sweet-mink branch from 4c637e4 to 732ec03 Compare July 20, 2023 20:35
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/doc-fix-metrics-description-rpc-client/manually-sweet-mink branch from 954a391 to cf5d230 Compare July 20, 2023 20:35
@hc-github-team-consul-core hc-github-team-consul-core enabled auto-merge (squash) July 20, 2023 20:35
Copy link
Copy Markdown
Collaborator

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

@github-actions github-actions Bot added the type/docs Documentation needs to be created/updated/clarified label Jul 20, 2023
@hc-github-team-consul-core hc-github-team-consul-core merged commit e9f9a8a into release/1.16.x Jul 20, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/doc-fix-metrics-description-rpc-client/manually-sweet-mink branch July 20, 2023 20:55
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