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

Update docs to use stat-inbound and stat-outbound #1833

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

adleong
Copy link
Member

@adleong adleong commented Aug 28, 2024

No description provided.

@kflynn
Copy link
Member

kflynn commented Aug 28, 2024

@adleong This looks great! 🙂

Copy link
Member

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

So much better. 🙂

Comment on lines +114 to +115
webapp [default]:4191 probe 100.00% 0.60 0ms 1ms 1ms
webapp [default]:7000 probe 100.00% 0.30 2ms 2ms 2ms
Copy link
Member

Choose a reason for hiding this comment

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

I'm actually not seeing the probe entries in my testing 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

that's odd. are they present in the proxy metrics? does your cluster use a non-default probe network cidr?

Copy link
Member

Choose a reason for hiding this comment

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

My cluster is a plain vanilla k3d cluster. I've got these probe metrics for webapp:

response_total{direction="inbound",target_addr="10.42.0.28:7000",target_ip="10.42.0.28",target_port="7000",tls="no_identity",no_tls_reason="no_tls_from_remote",srv_group="",srv_kind="default",srv_name="all-unauthenticated",route_group="",route_kind="default",route_name="probe",authz_group="",authz_kind="default",authz_name="probe",status_code="200",classification="success",grpc_status="",error=""} 97
response_total{direction="inbound",target_addr="0.0.0.0:4191",target_ip="0.0.0.0",target_port="4191",tls="no_identity",no_tls_reason="no_tls_from_remote",srv_group="",srv_kind="default",srv_name="all-unauthenticated",route_group="",route_kind="default",route_name="probe",authz_group="",authz_kind="default",authz_name="probe",status_code="200",classification="success",grpc_status="",error=""} 193

According to linkerd/linkerd2#12994, the route_names for these are getting overwritten with "default" because route_kind is "default":

func inboundKeyForSample(sample *model.Sample, resource *pb.Resource) inboundRowKey {
	labels := sample.Metric
	server := (string)(labels["srv_name"])
	route := (string)(labels["route_name"])
	routeType := (string)(labels["route_kind"])
	if labels["srv_kind"] == "default" {
		server = "[default]"
	}
	if labels["route_name"] == "default" {
		route = "[default]"
	}
	if labels["route_kind"] == "default" {
		routeType = ""
		route = "[default]"
	}

	return inboundRowKey{
		name:      (string)(labels[prometheus.ResourceType(resource)]),
		server:    server,
		route:     route,
		port:      (string)(labels["target_port"]),
		routeType: routeType,
	}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, good catch! fixed in the Linkerd PR.

Base automatically changed from alex/2.16-to-edge to main September 9, 2024 19:57
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.

3 participants