elastic / apm-agent-rum-js

https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html
MIT License
278 stars 133 forks source link

Extracting graphql operationName from POST requests #1161

Open sai56 opened 2 years ago

sai56 commented 2 years ago

Is it possible to display the operationName of graphql requests instead of "/graphql" path on the dashboard ?

It would be helpful if someone could guide me how to achieve this using the JS RUM agent.

Similar issue: https://github.com/elastic/apm-agent-nodejs/issues/2424

devcorpio commented 2 years ago

Hi @sai56

Thanks for reaching out!

Currently the JS RUM agent does not have any specific logic that intercepts graphql requests and then based in their payload to modify the transaction with a more identifiable name

What GraphQL client are you using?

We will discuss this in our team refinement

sai56 commented 2 years ago

Hi @devcorpio

Thanks for getting back on this question.

We use the graphql-request as our client.

mo commented 2 years ago

I have the same problem but we use apollo as the JS graphql client.