Skip to content

Commit a856dbd

Browse files
authored
outbound: Report concrete authorities for policies (#2313)
The new policy router currently reports a numeric authority when using policy routes. In some cases, we have a named concrete address for the load balancer. In the vast majority of cases, this address is the same as the logical service's. For now, let's use concrete addresses for telemetry. This will help minimize regressions while we figure how to move telemetry forward.
1 parent c4e6cfe commit a856dbd

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

linkerd/app/outbound/src/http/logical/policy.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,20 @@ where
227227
} = rts;
228228

229229
let mk_concrete = {
230-
let authority = addr.to_http_authority();
231230
let parent = parent.clone();
232-
move |target: concrete::Dispatch| Concrete {
233-
target,
234-
authority: Some(authority.clone()),
235-
parent: parent.clone(),
231+
move |target: concrete::Dispatch| {
232+
// XXX With policies we don't have a top-level authority name at
233+
// the moment. So, instead, we use the concrete addr used for
234+
// discovery for now.
235+
let authority = match target {
236+
concrete::Dispatch::Balance(ref a, _) => Some(a.as_http_authority()),
237+
_ => None,
238+
};
239+
Concrete {
240+
target,
241+
authority,
242+
parent: parent.clone(),
243+
}
236244
}
237245
};
238246

linkerd/app/outbound/src/sidecar.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,6 @@ impl svc::Param<http::Version> for HttpSidecar {
276276
}
277277
}
278278

279-
// XXX Policy routes report their `OrigDstAddr` as a `LogicalAddr`, since the
280-
// API responses don't provide an DNS-style name in the response. Instead, they
281-
// include resource coordinates. Telemetry will eventually have to be updated to
282-
// support report this richer metadata.
283279
impl svc::Param<http::LogicalAddr> for HttpSidecar {
284280
fn param(&self) -> http::LogicalAddr {
285281
http::LogicalAddr(match *self.routes.borrow() {

0 commit comments

Comments
 (0)