wundergraph / cosmo

The open-source solution to building, maintaining, and collaborating on GraphQL Federation at Scale. The alternative to Apollo Studio and GraphOS.
https://cosmo-docs.wundergraph.com/
Apache License 2.0
715 stars 103 forks source link

Name of the subgraph request #542

Open flymedllva opened 8 months ago

flymedllva commented 8 months ago

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

github-actions[bot] commented 8 months ago

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.

StarpTech commented 8 months ago

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

flymedllva commented 8 months ago

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