-
Notifications
You must be signed in to change notification settings - Fork 249
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
Request/Response body size metric per operation name #5152
Comments
@grzn It's actually already possible using custom router metric but not really obvious neither well documented. To get the operation name you can have it using telemetry:
instrumentation:
instruments:
router:
http.server.request.body.size:
attributes:
graphql.operation.name:
response_context: operation_name
http.server.response.body.size:
attributes:
graphql.operation.name:
response_context: operation_name |
@bnjjj thanks, it works well for request body size, but not for response body size; after adding this, the metrics lo longer shows on he metrics response.
|
Thanks @grzn I'll try to reproduce. Could you tell me which version of the router are you using ? |
I was able to reproduce @grzn. It's not related to the configuration but the implementation of the response body size metric itself. It's based on the value of |
cool, thanks @bnjjj |
The metric 'apollo_router_http_request_duration_seconds' is great, exposing the duration for each Gql operation.
It would even better to have a metric for the request/response body sizes per opeation.
From what I gather this is not doable with a custom router metric (does not have the operation name selector/attribute) and not with a super graph selector/attribute (does not have the request/body size)
The text was updated successfully, but these errors were encountered: