Comments (6)
@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 response_context
selector and use the operation_name
entry. That would result in something like this:
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
from router.
@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.
$ curl http://localhost:9091/metrics | grep http_server_res
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 69332 100 69332 0 0 53.4M 0 --:--:-- --:--:-- --:--:-- 66.1M
from router.
Thanks @grzn I'll try to reproduce. Could you tell me which version of the router are you using ?
from router.
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 content-length
header but that header is not populated. I need to dig more in order to fix that issue I'll create a follow up issue and close this one.
from router.
from router.
cool, thanks @bnjjj
from router.
Related Issues (20)
- Parsing Failure with Variables in Fragments of Non-Executed Queries in the Same Payload HOT 5
- Rhai: Allow setting or overriding request port
- telemetry: specific events attributes configured in custom telemetry won't be displayed if the trace is not sampled
- Using Grpc protocol in the router to communicate with the federated services
- Websocket protocol name is misnamed for subscription HOT 1
- Update Xcode to 15.1.0 or above HOT 1
- Give to standard events the ability to be displayed conditionally
- security: confirmation of NON-impact: RUSTSEC-2024-0344 / GHSA-x4gp-pqpj-f43q
- Unnecessary cache warmup message displayed on router startup HOT 2
- telemetry: add router_response selector to dump the router_response as a string
- [Bug] AUTH_ERROR does not include content-type header
- Do not aggregate custom event attributes if the level is lower than what's allowed
- Change default service name from unknown_service to apollo-router HOT 2
- Caching hook with Rhai or Coprocessor
- Allow coprocessors to modify path in RouterService
- Configurability of log attributes HOT 3
- Provide Helm chart JSON schema
- Better error message for regex validation in header logging
- Document deprecated metrics
- Serialize trace to response extensions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.