Skip to content

Authority label should reflect logical dst#300

Merged
adleong merged 2 commits intomasterfrom
alex/dst-metrics-take-two
Aug 7, 2019
Merged

Authority label should reflect logical dst#300
adleong merged 2 commits intomasterfrom
alex/dst-metrics-take-two

Conversation

@adleong
Copy link
Member

@adleong adleong commented Aug 6, 2019

Supersedes #296

The authority label reflects the concrete dst of the request in the endpoint stack. In the case of a traffic split, this may be different from the actual authority of the request (i.e. the logical dst).

We add the logical dst as a field on the endpoint target and use this value for the authority label instead of the concrete dst.

The net result is that the authority field reflects the apex service of a traffic split and the dst_service label reflects the leaf service.

E.g.:

response_total{authority="authors.default.svc.cluster.local:7001",direction="outbound",dst_control_plane_ns="linkerd",dst_deployment="authors-v2",dst_namespace="default",dst_pod="authors-v2-7cffd4894-crhbw",dst_pod_template_hash="7cffd4894",dst_service="authors-v2",dst_serviceaccount="default",tls="true",server_id="default.default.serviceaccount.identity.linkerd.cluster.local",status_code="201",classification="success"} 5

This PR can be tested with the alex-dst-metrics-4 proxy tag.

adleong added 2 commits August 6, 2019 15:52
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

I think it would be good if the distinction between dst_logical and dst_concrete was documented in the code where they appear, if possible.

@olix0r
Copy link
Member

olix0r commented Aug 6, 2019

I'm curious if we should make the authority label only refer to the host/authority value and introduce a new label, dst_logical, that includes the value of l5d-dst-override, etc... But this is probably unnecessary and may make things more complex than they need to be...

@scottcarol
Copy link

When I tested this, it worked as expected when I queried Prometheus for outbound requests while I had a trafficsplit running. 👍

{authority="authors.default.svc.cluster.local:7001", dst_service="authors"}
{authority="authors.default.svc.cluster.local:7001",dst_service="authors-clone"}

Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

lgtm.. before merging, though, can you confirm whether any of the (flakey) metrics tests need to be updated with the new metrics?

@olix0r
Copy link
Member

olix0r commented Aug 7, 2019

@adleong nm. i see flakey test failures that appear unrelated to your change.

@adleong adleong merged commit f9dd4f8 into master Aug 7, 2019
@adleong adleong deleted the alex/dst-metrics-take-two branch August 7, 2019 23:09
scottcarol pushed a commit to linkerd/linkerd2 that referenced this pull request Aug 8, 2019
* update-rust-version: Check usage (linkerd/linkerd2-proxy#298)
* tap: fix tap response streams never ending (linkerd/linkerd2-proxy#299)
* Require identity on tap requests (linkerd/linkerd2-proxy#295)
* Authority label should reflect logical dst (linkerd/linkerd2-proxy#300)
* Replace futures_watch with tokio::sync::watch (linkerd/linkerd2-proxy#301)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Aug 9, 2019
* Update h2 to v0.1.26
* Properly fall back in the dst_router (linkerd/linkerd2-proxy#291)
* Tap server authorizes clients when identity is expected (linkerd/linkerd2-proxy#290)
* update-rust-version: Check usage (linkerd/linkerd2-proxy#298)
* tap: fix tap response streams never ending (linkerd/linkerd2-proxy#299)
* Require identity on tap requests (linkerd/linkerd2-proxy#295)
* Authority label should reflect logical dst (linkerd/linkerd2-proxy#300)
* Replace futures_watch with tokio::sync::watch (linkerd/linkerd2-proxy#301)
* metrics: add `request_handle_us` histogram (linkerd/linkerd2-proxy#294)
* linkerd2-proxy: Adopt Rust 2018 (linkerd/linkerd2-proxy#302)
* Remove futures-mpsc-lossy (linkerd/linkerd2-proxy#305)
* Adopt std::convert::TryFrom (linkerd/linkerd2-proxy#304)
* lib: Rename directories to match crate names (linkerd/linkerd2-proxy#303)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Aug 9, 2019
* update-rust-version: Check usage (linkerd/linkerd2-proxy#298)
* tap: fix tap response streams never ending (linkerd/linkerd2-proxy#299)
* Require identity on tap requests (linkerd/linkerd2-proxy#295)
* Authority label should reflect logical dst (linkerd/linkerd2-proxy#300)
* Replace futures_watch with tokio::sync::watch (linkerd/linkerd2-proxy#301)
* metrics: add `request_handle_us` histogram (linkerd/linkerd2-proxy#294)
* linkerd2-proxy: Adopt Rust 2018 (linkerd/linkerd2-proxy#302)
* Remove futures-mpsc-lossy (linkerd/linkerd2-proxy#305)
* Adopt std::convert::TryFrom (linkerd/linkerd2-proxy#304)
* lib: Rename directories to match crate names (linkerd/linkerd2-proxy#303)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Aug 9, 2019
* update-rust-version: Check usage (linkerd/linkerd2-proxy#298)
* tap: fix tap response streams never ending (linkerd/linkerd2-proxy#299)
* Require identity on tap requests (linkerd/linkerd2-proxy#295)
* Authority label should reflect logical dst (linkerd/linkerd2-proxy#300)
* Replace futures_watch with tokio::sync::watch (linkerd/linkerd2-proxy#301)
* metrics: add `request_handle_us` histogram (linkerd/linkerd2-proxy#294)
* linkerd2-proxy: Adopt Rust 2018 (linkerd/linkerd2-proxy#302)
* Remove futures-mpsc-lossy (linkerd/linkerd2-proxy#305)
* Adopt std::convert::TryFrom (linkerd/linkerd2-proxy#304)
* lib: Rename directories to match crate names (linkerd/linkerd2-proxy#303)
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.

4 participants