This request is similar to #8134, and relates to #8003.
I'm trying to join inbound and outbound metrics for a pod-to-pod cross-cluster request, and the set of outbound labels provided by linkerd on pod-to-pod cross-cluster requests differs from the set of outbound labels provided by linkerd for standard cross-cluster requests. It would be easier to join these metrics if they exported the same set of labels.
For example, if my application makes a standard cross-cluster request, I see the following labels on the response_total timeseries:
You can see that the dst_target* labels are missing from the second timeseries. In fact, the second timeseries looks almost identical to an in-cluster request, which makes this even more confusing:
When a cross-cluster pod-to-pod request is made, it would be great to include all dst_target* labels that are appropriate, but at a minimum, the dst_target_cluster label.
Alternatively, each type of request (in-cluster, pod-to-pod cross-cluster, standard cross-cluster) could be exported in a different timeseries, with different sets of labels. That would avoid the need to inspect individual labels to know what kind of request it is.
Any alternatives you've considered?
We can derive the value of the dst_target_cluster label from the existing labels, but it seems super brittle and only works for HTTP requests, since it would rely on the authority label. From the pod-to-pod cross-cluster request labels above, we have:
The first segment of the authority header is the name of the service to which this request was sent, and that differs from the value of the dst_service label. If we assume that mirrored services are always named as <dst_service>-<target_cluster>, then we can strip the dst service from the authority header to get the target cluster name ("west", in this case).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
What problem are you trying to solve?
This request is similar to #8134, and relates to #8003.
I'm trying to join inbound and outbound metrics for a pod-to-pod cross-cluster request, and the set of outbound labels provided by linkerd on pod-to-pod cross-cluster requests differs from the set of outbound labels provided by linkerd for standard cross-cluster requests. It would be easier to join these metrics if they exported the same set of labels.
For example, if my application makes a standard cross-cluster request, I see the following labels on the response_total timeseries:
Whereas if my application makes a pod-to-pod cross-cluster request, I see this set of labels:
You can see that the
dst_target*
labels are missing from the second timeseries. In fact, the second timeseries looks almost identical to an in-cluster request, which makes this even more confusing:How should the problem be solved?
When a cross-cluster pod-to-pod request is made, it would be great to include all
dst_target*
labels that are appropriate, but at a minimum, thedst_target_cluster
label.Alternatively, each type of request (in-cluster, pod-to-pod cross-cluster, standard cross-cluster) could be exported in a different timeseries, with different sets of labels. That would avoid the need to inspect individual labels to know what kind of request it is.
Any alternatives you've considered?
We can derive the value of the
dst_target_cluster
label from the existing labels, but it seems super brittle and only works for HTTP requests, since it would rely on theauthority
label. From the pod-to-pod cross-cluster request labels above, we have:The first segment of the authority header is the name of the service to which this request was sent, and that differs from the value of the
dst_service
label. If we assume that mirrored services are always named as<dst_service>-<target_cluster>
, then we can strip the dst service from the authority header to get the target cluster name ("west", in this case).How would users interact with this feature?
Via metrics
Would you like to work on this feature?
no