-
Notifications
You must be signed in to change notification settings - Fork 275
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
Review apollo_router_http_requests_total
metric usage
#4703
Labels
potentially-breaking
Requires an incompatible change
Comments
I think that this metric can largely be replaced once the work for custom instruments that @bnjjj is working on lands. |
Will this be replaced by |
Yes this example of configuration should do the same job telemetry:
instrumentation:
instruments:
router:
http.server.request.duration:
attributes:
error:
error: reason
operation_name:
response_context: operation_name
status:
response_status: code |
This PR will help to add operation_name at the router service without playing with the response_context |
Closing and we will look to review all metrics for the next major release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The behaviour of this metric is confusing right now. Looking at the telemetry plugin, it is supposed to be recorded on every response:
router/apollo-router/src/plugins/telemetry/mod.rs
Lines 853 to 860 in 05a651d
but is set in multiple places:
router/apollo-router/src/plugins/telemetry/mod.rs
Lines 1123 to 1128 in 05a651d
but it is also directly set in other places like
router/apollo-router/src/services/layers/query_analysis.rs
Lines 75 to 80 in 05a651d
I looked into that because the content-negotiation layer does not set this metric when returning a HTTP 415:
router/apollo-router/src/services/layers/content_negotiation.rs
Lines 55 to 73 in 05a651d
The
apollo_router_operations_total
metric, though, correctly record a 415 statusThe text was updated successfully, but these errors were encountered: