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

Improve REST API metrics #3205

Closed
dapplion opened this issue Sep 19, 2021 · 1 comment
Closed

Improve REST API metrics #3205

dapplion opened this issue Sep 19, 2021 · 1 comment
Labels
good first issue Issues that are suitable for first-time contributors. prio-medium Resolve this some time soon (tm). scope-metrics All issues with regards to the exposed metrics.

Comments

@dapplion
Copy link
Contributor

Describe the bug

Only successful requests are registered in metrics. Metrics should register incoming requests, then successful / error requests, and timed out requests

@dapplion dapplion added the scope-metrics All issues with regards to the exposed metrics. label Sep 19, 2021
@philknows philknows added the prio-medium Resolve this some time soon (tm). label Feb 4, 2022
@nflaig nflaig added the good first issue Issues that are suitable for first-time contributors. label Oct 18, 2023
@nflaig
Copy link
Member

nflaig commented Nov 5, 2023

All metrics besides timeouts are already tracked and we decided that tracking timeouts does not make sense

Errors

errors: register.gauge<"operationId">({
name: "lodestar_api_rest_errors_total",
help: "REST API total count of errors by operationId",
labelNames: ["operationId"],
}),

Requests total / response times

responseTime: register.histogram<"operationId">({
name: "lodestar_api_rest_response_time_seconds",
help: "REST API time to fulfill a request by operationId",
labelNames: ["operationId"],
// Request times range between 1ms to 100ms in normal conditions. Can get to 1-5 seconds if overloaded
buckets: [0.01, 0.1, 1],
}),
requests: register.gauge<"operationId">({
name: "lodestar_api_rest_requests_total",
help: "REST API total count requests by operationId",
labelNames: ["operationId"],
}),

@nflaig nflaig closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are suitable for first-time contributors. prio-medium Resolve this some time soon (tm). scope-metrics All issues with regards to the exposed metrics.
Projects
None yet
Development

No branches or pull requests

3 participants