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

add docs for new labels #12757

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions website/content/docs/agent/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,13 @@ Note that values of the `consul.rpc.server.call` may emit as `0 ms`. That means

The the server workload metrics above come with the following labels:

| Label Name | Description | Possible values |
| ------------------------------------- | --------------------------------------------------------- | --------------------------------------- |
| `method` | The name of the RPC method. | The value of any RPC request in Consul. |
| `errored` | Indicates whether the RPC call errored. | `True` or `False`. |
| `request_type` | Whether it is a `read` or `write` request. | `read`, `write` or `unreported`. |
| `rpc_type` | The RPC implementation. | `net/rpc` or `internal`. |
| Label Name | Description | Possible values |
| ------------------------------------- | -------------------------------------------------------------------- | --------------------------------------- |
| `method` | The name of the RPC method. | The value of any RPC request in Consul. |
| `errored` | Indicates whether the RPC call errored. | `true` or `false`. |
| `request_type` | Whether it is a `read` or `write` request. | `read`, `write` or `unreported`. |
| `rpc_type` | The RPC implementation. | `net/rpc` or `internal`. |
| `leader` | Whether the server was a `leader` or not at the time of the request. | `true`, `false` or `unreported`. |

#### Label Explanations

Expand All @@ -551,6 +552,23 @@ Historically, `internal` RPC operation metrics were accounted under the same met

The `unreported` value for the `request_type` in the table above refers to RPC requests within Consul where it is difficult to ascertain whether a request is `read` or `write` type.

The `unreported` value for the `leader` label in the table above refers to RPC requests where Consul cannot determine the leadership status for a server.

#### Read Request Labels

In addition to the labels above, for read requests, the following may be populated:

| Label Name | Description | Possible values |
| ------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| `blocking` | Whether the read request passed in a `MinQueryIndex`. | `true` if a MinQueryIndex was passed, `false` otherwise. |
| `target_datacenter` | The target datacenter for the read request. | The string value of the target datacenter for the request. |
| `locality` | Gives an indication of whether the RPC request is local or has been forwarded. | `local` or `forwarded`. |

##### Read Request Label Explanations

We determine the values for the `locality` label by looking at the current server datacenter and the request target datacenter. If they match, we call that `local` RPC request.
Otherwise, we call that RPC request `forwarded`.
acpana marked this conversation as resolved.
Show resolved Hide resolved

Here is a Prometheus style example of an RPC metric and its labels:

<CodeBlockConfig heading="Sample output of telemetry dump">
Expand Down