-
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
Add connectors HTTP metrics #5900
Conversation
@bnjjj can you take a look at these new metrics? 🙏🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we really need this as we already have metrics for subgraphs https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/instruments#opentelemetry-standard-instruments What's the difference, how could we try to include this metrics in custom telemetry ? Is it related to a specific service in plugin trait ?
cc @BrynCooke |
@bnjjj - these metrics are modeled after these router metrics, only instead of for subgraph calls, these are for REST API calls made through the connector service. They are scoped to a connector, so we can see, for example, that for a given connector, how many requests received a status 200 vs 404, or a histogram of how long the HTTP requests take in the REST API. If there's a better way of doing this please let me know. |
Agree that metrics should integrate with the existing standard instruments rather than making new ones. In particular adding a selector for the connector. This way users can configure the metrics to include whatever information they want. The problem with fixed metrics is that users almost always need to add extra attributes to make them useful. In general the rule is, if the metric change was a result of a request then it should be integrated with the telemetry config, lifecycle things such as router reloads can be static. |
Going to rework this based on conversations with the router team. |
Add connectors HTTP metrics:
apollo_router_http_connector_requests_total
- counts requests by subgraph/connector/statusapollo_router_http_connector_request_duration_seconds
- a histogram of request times by subgraph/connectorExample metric data:
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩