# Service per-route Route Metrics numbers do not show up

**URL:** <https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139>\
**Category:** Linkerd General Discussion\
**Tags:** metrics\
**Created:** [May 26, 2023, 11:01am UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139 "2023-05-26T11:01:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharhtet](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tharhtet](https://linkerd.buoyant.io/u/tharhtet)\
**Post date:** [May 26, 2023, 11:01am UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/1 "2023-05-26T11:01:53Z")

</div>

Hi all,

I am learning how to configure to see Per-Route Metrics by following the documentations.

I am using the given “booksapp” example.

After following all the steps and applied “Service Profiles” for all books, authors and webapp services, I got “Live Call” views with running requests and numbers in the Viz.

As for “Route Metrics” I can see the list of routes as configured in “Service Profiles” yml files.

But there is no “Success Rate” and “RPS” nor other Latency numbers showed up.

Results as follows:

```auto
$ linkerd viz routes deploy/books
ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99
DELETE /books/{id}.json books - - - - -
GET /books.json books - - - - -
GET /books/{id}.json books - - - - -
POST /books.json books - - - - -
PUT /books/{id}.json books - - - - -
[DEFAULT] books - - - - -

```

After checking with Tap, I found that the request logged does not contain  
`rt_route`, thus :path is used for Regex matching in Service Profile.

Example Tap res as follows.

```auto
req id=1:22 proxy=in src=10.1.0.103:56104 dst=10.1.0.104:7002 tls=true :method=GET :authority=books:7002 :path=/books.json src_client_id=webapp.default.serviceaccount.identity.linkerd.cluster.local src_control_plane_ns=linkerd src_deployment=webapp src_namespace=default src_pod=webapp-77bb8d7ff5-zt47r src_pod_template_hash=77bb8d7ff5 src_serviceaccount=webapp src_tls=true dst_authz_group= dst_authz_kind=default dst_authz_name=all-unauthenticated dst_control_plane_ns=linkerd dst_deployment=books dst_namespace=default dst_pod=books-6f595989ff-s24vf dst_pod_template_hash=6f595989ff dst_route_group= dst_route_kind=default dst_route_name=default dst_serviceaccount=books dst_srv_group= dst_srv_kind=default dst_srv_name=all-unauthenticated dst_tls=loopback

req id=1:23 proxy=in src=10.1.0.103:56104 dst=10.1.0.104:7002 tls=true :method=GET :authority=books:7002 :path=/books.json src_client_id=webapp.default.serviceaccount.identity.linkerd.cluster.local src_control_plane_ns=linkerd src_deployment=webapp src_namespace=default src_pod=webapp-77bb8d7ff5-zt47r src_pod_template_hash=77bb8d7ff5 src_serviceaccount=webapp src_tls=true dst_authz_group= dst_authz_kind=default dst_authz_name=all-unauthenticated dst_control_plane_ns=linkerd dst_deployment=books dst_namespace=default dst_pod=books-6f595989ff-s24vf dst_pod_template_hash=6f595989ff dst_route_group= dst_route_kind=default dst_route_name=default dst_serviceaccount=books dst_srv_group= dst_srv_kind=default dst_srv_name=all-unauthenticated dst_tls=loopback

```

Did I miss anything or does it requires special specific configuration to make the details collected?

Thanks,  
Thar

---

<div class="post-metadata">

**Author:** ![jmo](https://yyz1.discourse-cdn.com/flex029/user_avatar/linkerd.buoyant.io/jmo/32/62_2.png) [@jmo](https://linkerd.buoyant.io/u/jmo)\
**Post date:** [May 26, 2023, 12:17pm UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/2 "2023-05-26T12:17:35Z")

</div>

Hey @tharhtet, can you share your Linkerd version?

---

<div class="post-metadata">

**Author:** ![alpeb](https://yyz1.discourse-cdn.com/flex029/user_avatar/linkerd.buoyant.io/alpeb/32/61_2.png) [@alpeb](https://linkerd.buoyant.io/u/alpeb)\
**Post date:** [May 26, 2023, 1:19pm UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/3 "2023-05-26T13:19:39Z")

</div>

This appears to be a known issue:

> <https://github.com/linkerd/linkerd2/issues/10521>
>
> I verified this started to happen on edge-23.3.1 (proxy v2.191.2).
> 
> \## Repro
> …
> \`\`\`bash
> \# install the booksapp injected
> $ kubectl create ns booksapp && \\
> linkerd inject https://run.linkerd.io/booksapp.yml \\
> | kubectl -n booksapp apply -f -
> 
> \# install the webapp ServiceProfile
> $ curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/booksapp/webapp.swagger \\
> | linkerd -n booksapp profile --open-api - webapp \\
> | kubectl -n booksapp apply -f -
> 
> \# viz routes is empty (this also affects the Routes Metrics tab in the dashboard)
> $ linkerd viz -n booksapp routes deploy/webapp
> ROUTE SERVICE SUCCESS RPS LATENCY\_P50 LATENCY\_P95 LATENCY\_P99
> GET / webapp - - - - -
> GET /authors/{id} webapp - - - - -
> GET /books/{id} webapp - - - - -
> POST /authors webapp - - - - -
> POST /authors/{id}/delete webapp - - - - -
> POST /authors/{id}/edit webapp - - - - -
> POST /books webapp - - - - -
> POST /books/{id}/delete webapp - - - - -
> POST /books/{id}/edit webapp - - - - -
> \[DEFAULT\] webapp - - - - -
> 
> \# the metric only has entries for the outbound label
> $ linkerd diagnostics proxy-metrics -n booksapp deploy/webapp | grep route\_response\_latency\_ms\_bucket
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="1"} 263
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="2"} 321
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="3"} 326
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="4"} 326
> \--snip--
> \`\`\`

Please try bumping the traffic pod, and see if that helps.

---

<div class="post-metadata">

**Author:** ![tharhtet](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tharhtet](https://linkerd.buoyant.io/u/tharhtet)\
**Post date:** [May 27, 2023, 2:34am UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/4 "2023-05-27T02:34:27Z")

</div>

Hello Jason,

I am using stable-2.13.3

```auto
$ linkerd version
Client version: stable-2.13.3
Server version: stable-2.13.3

```

Thank you!

---

<div class="post-metadata">

**Author:** ![tharhtet](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tharhtet](https://linkerd.buoyant.io/u/tharhtet)\
**Post date:** [May 27, 2023, 2:36am UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/5 "2023-05-27T02:36:24Z")

</div>

Thanks @alpeb I will try that.

---

<div class="post-metadata">

**Author:** ![tharhtet](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tharhtet](https://linkerd.buoyant.io/u/tharhtet)\
**Post date:** [May 27, 2023, 3:31am UTC](https://linkerd.buoyant.io/t/service-per-route-route-metrics-numbers-do-not-show-up/139/6 "2023-05-27T03:31:27Z")

</div>

Looks like, I am confirming the the following bug again.

> <https://github.com/linkerd/linkerd2/issues/10521#issuecomment-1552111568>
>
> I verified this started to happen on edge-23.3.1 (proxy v2.191.2).
> 
> \## Repro
> …
> \`\`\`bash
> \# install the booksapp injected
> $ kubectl create ns booksapp && \\
> linkerd inject https://run.linkerd.io/booksapp.yml \\
> | kubectl -n booksapp apply -f -
> 
> \# install the webapp ServiceProfile
> $ curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/booksapp/webapp.swagger \\
> | linkerd -n booksapp profile --open-api - webapp \\
> | kubectl -n booksapp apply -f -
> 
> \# viz routes is empty (this also affects the Routes Metrics tab in the dashboard)
> $ linkerd viz -n booksapp routes deploy/webapp
> ROUTE SERVICE SUCCESS RPS LATENCY\_P50 LATENCY\_P95 LATENCY\_P99
> GET / webapp - - - - -
> GET /authors/{id} webapp - - - - -
> GET /books/{id} webapp - - - - -
> POST /authors webapp - - - - -
> POST /authors/{id}/delete webapp - - - - -
> POST /authors/{id}/edit webapp - - - - -
> POST /books webapp - - - - -
> POST /books/{id}/delete webapp - - - - -
> POST /books/{id}/edit webapp - - - - -
> \[DEFAULT\] webapp - - - - -
> 
> \# the metric only has entries for the outbound label
> $ linkerd diagnostics proxy-metrics -n booksapp deploy/webapp | grep route\_response\_latency\_ms\_bucket
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="1"} 263
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="2"} 321
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="3"} 326
> route\_response\_latency\_ms\_bucket{direction="outbound",dst="books.booksapp.svc.cluster.local:7002",status\_code="200",le="4"} 326
> \--snip--
> \`\`\`

I setup the Service Profile before injecting linkerd to existing pods.

Then the per routes metric numbers appear. All OK.

```auto
$ linkerd viz -n booksapp routes svc/books
ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99
DELETE /books/{id}.json books 100.00% 1.1rps 8ms 17ms 19ms
GET /books.json books 100.00% 1.7rps 9ms 19ms 20ms
GET /books/{id}.json books 100.00% 2.1rps 8ms 10ms 10ms
POST /books.json books 50.00% 2.3rps 20ms 29ms 30ms
PUT /books/{id}.json books 56.67% 1.0rps 27ms 93ms 99ms
[DEFAULT] books - - - - -

```

So it is due to known issue.

Thank you!
