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

feat: add delegated routing metrics #9354

Merged
merged 1 commit into from
Oct 19, 2022
Merged

Conversation

guseggert
Copy link
Contributor

Example log output:

Enable warn level:

$ ipfs log level 'service/client/delegatedrouting' WARN

Output:

2022-10-19T08:22:28.009-0400    WARN    service/client/delegatedrouting client/metrics.go:51    received delegated routing error        {"Error": "sending HTTP request: Get \"http://127.0.0.1:5098/reframe?q=...\": dial tcp 127.0.0.1:5098: connect: connection refused"}

Metrics:

$ curl -s http://127.0.01:5001/debug/metrics/prometheus | grep -i delegated
# HELP delegated_routing_duration The time to complete an entire request
# TYPE delegated_routing_duration histogram
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="1"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="2"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="5"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="10"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="20"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="50"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="100"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="200"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="500"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="1000"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="2000"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="5000"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="10000"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="20000"} 1
delegated_routing_duration_bucket{error="Net",name="ContentRoutingClient.FindProvidersAsync",le="+Inf"} 1
delegated_routing_duration_sum{error="Net",name="ContentRoutingClient.FindProvidersAsync"} 0
delegated_routing_duration_count{error="Net",name="ContentRoutingClient.FindProvidersAsync"} 1
# HELP delegated_routing_requests The number of requests made
# TYPE delegated_routing_requests counter
delegated_routing_requests{error="Net",name="ContentRoutingClient.FindProvidersAsync"} 1

@guseggert guseggert force-pushed the feat/delegated-routing-metrics branch from ab011bb to 0c3d46f Compare October 19, 2022 13:26
@guseggert guseggert marked this pull request as ready for review October 19, 2022 13:42
@guseggert guseggert merged commit 8c72ea9 into master Oct 19, 2022
@hacdias hacdias deleted the feat/delegated-routing-metrics branch May 9, 2023 11:04
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.

2 participants