cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

Name of the subgraph request

Open flymedllva opened this issue 1 year ago • 3 comments
trafficstars

Component(s)

router

Is your feature request related to a problem? Please describe.

In the subgraph, it is not clear what kind of request came to him, I want to draw beautiful metrics

Current queries in subgraphs do not contain information about the name of the query at all

supergraph query:

query Test {
  testField
}

subgraph query:

{"query":"{testField}"}

Describe the solution you'd like

Do it like in the Apollo Rover

Requests must contain the name of the parent request and information about nesting

Query Test__service_name__3
Query Test__service_name__2
Query Test__service_name__0

Describe alternatives you've considered

No response

Additional context

No response

flymedllva avatar Feb 16 '24 10:02 flymedllva

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.

github-actions[bot] avatar Feb 16 '24 10:02 github-actions[bot]

Is there any reason why you're not using our OTEL integration? There we provide this information and more.

StarpTech avatar Feb 19 '24 10:02 StarpTech

We want to use only router and we only need our own metrics unified for all our golang services. Since router goes to our subgraphs via HTTP, for drawing metrics of a subgraph service we need to know what request came (its name), otherwise all requests look like they came to /graphql. Here is an example of how we see our requests if Apollo Rover comes to the subgraph Screenshot 2024-02-26 at 13 54 39 That is, we just seem to have nowhere to get the name of the query other than putting in the headers from the module

flymedllva avatar Feb 26 '24 11:02 flymedllva