mirror of https://github.com/linkerd/linkerd2.git
Introduce meshed label in simulate-proxy (#992)
The proxy does not yet support a `meshed` label. In anticipation of a `meshed` label in the proxy, introduce this label in `simulate-proxy`, for testing. Relates to #306 and #386. Signed-off-by: Andrew Seigner <siggy@buoyant.io> secured -> meshed Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This commit is contained in:
parent
6fccdee58e
commit
8a3b1a638a
|
@ -370,12 +370,19 @@ func newSimulatedProxy(
|
||||||
// "replica_set",
|
// "replica_set",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make 50% of requests meshed
|
||||||
|
meshed := "false"
|
||||||
|
if rand.Int31n(2) > 0 {
|
||||||
|
meshed = "true"
|
||||||
|
}
|
||||||
|
|
||||||
constLabels := prom.Labels{
|
constLabels := prom.Labels{
|
||||||
"authority": "fakeauthority:123",
|
"authority": "fakeauthority:123",
|
||||||
"namespace": pod.GetNamespace(),
|
"namespace": pod.GetNamespace(),
|
||||||
"deployment": deploy.Name,
|
"deployment": deploy.Name,
|
||||||
"pod_template_hash": pod.GetLabels()["pod-template-hash"],
|
"pod_template_hash": pod.GetLabels()["pod-template-hash"],
|
||||||
"pod": pod.GetName(),
|
"pod": pod.GetName(),
|
||||||
|
"meshed": meshed,
|
||||||
|
|
||||||
// TODO: support other k8s objects
|
// TODO: support other k8s objects
|
||||||
// "daemon_set",
|
// "daemon_set",
|
||||||
|
|
|
@ -34,6 +34,9 @@ Each of these metrics has the following labels:
|
||||||
header of the request.
|
header of the request.
|
||||||
* `direction`: `inbound` if the request originated from outside of the pod,
|
* `direction`: `inbound` if the request originated from outside of the pod,
|
||||||
`outbound` if the request originated from inside of the pod.
|
`outbound` if the request originated from inside of the pod.
|
||||||
|
* `meshed`: `false` if the request's source and destination were not in the
|
||||||
|
mesh,
|
||||||
|
`true` if the request's source and destination were in the mesh.
|
||||||
|
|
||||||
### Response Labels
|
### Response Labels
|
||||||
|
|
||||||
|
@ -150,17 +153,17 @@ A gauge of the number of transport connections currently open.
|
||||||
|
|
||||||
### `tcp_write_bytes_total`
|
### `tcp_write_bytes_total`
|
||||||
|
|
||||||
A counter of the total number of sent bytes. This is updated when the
|
A counter of the total number of sent bytes. This is updated when the
|
||||||
connection closes.
|
connection closes.
|
||||||
|
|
||||||
### `tcp_read_bytes_total`
|
### `tcp_read_bytes_total`
|
||||||
|
|
||||||
A counter of the total number of recieved bytes. This is updated when the
|
A counter of the total number of recieved bytes. This is updated when the
|
||||||
connection closes.
|
connection closes.
|
||||||
|
|
||||||
### `tcp_connection_duration_ms`
|
### `tcp_connection_duration_ms`
|
||||||
|
|
||||||
A histogram of the duration of the lifetime of a connection, in milliseconds.
|
A histogram of the duration of the lifetime of a connection, in milliseconds.
|
||||||
This is updated when the connection closes.
|
This is updated when the connection closes.
|
||||||
|
|
||||||
## Labels
|
## Labels
|
||||||
|
|
Loading…
Reference in New Issue