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

proxy metrics endpoint returns only one metric #905

Closed
siggy opened this issue May 8, 2018 · 2 comments · Fixed by #906
Closed

proxy metrics endpoint returns only one metric #905

siggy opened this issue May 8, 2018 · 2 comments · Fixed by #906
Assignees
Milestone

Comments

@siggy
Copy link
Member

siggy commented May 8, 2018

Background

Hitting the proxy's /metrics endpoint sometimes gives complete data, and sometimes only returns process_start_time_seconds:

$ curl -s localhost:4191/metrics
# HELP process_start_time_seconds Time that the process started (in seconds since the UNIX epoch)
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1525739904
$ curl -s localhost:4191/metrics|wc -l
99
$ curl -s localhost:4191/metrics|wc -l
3
$ curl -s localhost:4191/metrics|wc -l
3
$ curl -s localhost:4191/metrics|wc -l
3
$ curl -s localhost:4191/metrics|wc -l
99

Repro steps

From master, (https://github.com/runconduit/conduit/tree/02e6d018d0790a69b95ef0c5630120668fc5e280 as of this issue):

  1. Build Conduit:
DOCKER_TRACE=1 bin/docker-build && bin/conduit install | kubectl apply -f - && curl https://raw.githubusercontent.com/runconduit/conduit-examples/master/emojivoto/emojivoto.yml | bin/conduit inject - | kubectl apply -f -
  1. SSH into proxy:
kubectl -n emojivoto exec -it $(kubectl -n emojivoto get po --selector=app=web-svc -o jsonpath='{.items[*].metadata.name}') /bin/bash -c conduit-proxy
  1. curl metrics:
curl localhost:4191/metrics

Source

While testing Grafana, @rmars observed gaps in proxy metrics: #904 (comment)

@siggy siggy added this to the 0.5.0 milestone May 8, 2018
@olix0r olix0r self-assigned this May 8, 2018
@olix0r
Copy link
Member

olix0r commented May 8, 2018

I can't replicate this exact behavior -- my proxy alternates between 174 and 203 lines of output -- but I think i have a lead to pursue on this

@olix0r
Copy link
Member

olix0r commented May 8, 2018

Using this script:

:; CURL="kubectl -n emojivoto exec -it web-8d775d974-k2mwq -c conduit-proxy -- curl" ./debug.sh
*      154	a9be5182
*      212	787d2bda
*      183	91ced213
       154	a9be5182
       154	a9be5182
       154	a9be5182
       183	91ced213
       183	91ced213
       183	91ced213
...

I notice differences such as

-response_latency_ms_bucket{authority="voting-svc.emojivoto:8080",direction="outbound",dst_namespace="emojivoto",dst_service="voting-svc",dst_pod="voting-59fdf85876-6dhvc",dst_pod_template_hash="1598941432",dst_deployment="voting",classification="failure",status_code="200",grpc_status_code="2",le="+Inf"}
+response_latency_ms_bucket{authority="voting-svc.emojivoto:8080",direction="outbound",dst_namespace="emojivoto",dst_service="voting-svc",dst_pod="voting-59fdf85876-6dhvc",dst_pod_template_hash="1598941432",dst_deployment="voting",classification="success",status_code="200",grpc_status_code="0",le="+Inf"}

olix0r added a commit that referenced this issue May 8, 2018
It's easy to misconfigure default durations, since they're recorded as
integers and converted to Durations separately.

Now, all default constants that represent durations use const `Duration`
instances (enabled by a recent Rust release).

This fixes #905 which was caused by using the wrong time unit for the
metrics retain time.
olix0r added a commit that referenced this issue May 8, 2018
It's easy to misconfigure default durations, since they're recorded as
integers and converted to Durations separately.

Now, all default constants that represent durations use const `Duration`
instances (enabled by a recent Rust release).

This fixes #905 which was caused by using the wrong time unit for the
metrics retain time.
khappucino pushed a commit to Nordstrom/linkerd2 that referenced this issue Mar 5, 2019
It's easy to misconfigure default durations, since they're recorded as
integers and converted to Durations separately.

Now, all default constants that represent durations use const `Duration`
instances (enabled by a recent Rust release).

This fixes linkerd#905 which was caused by using the wrong time unit for the
metrics retain time.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants