New Feature: Support for GraphQL Queries in Timeline Profiler
We have just released the PHP Extension version 5.0.62 which includes a new feature, instrumentation for GraphQL queries made using the webonyx/graphql-php package, the most widespread GraphQL server package for PHP, for example by Magento 2.
The following screenshot shows how GraphQL spans are rendered in the Tidways Timeline Profiler, here using a Magento 2 GraphQL endpoint responding to a query for the cart:
GraphQL queries are parsed and anonymized in the tideways-daemon running on your machines in a similar way to how SQL queries are anonymized.
Each resolver has its own sub-span under the GraphQL query, so that you can see what part of the query took how long. This allows you to see exactly what SQL and Redis calls are made in resolvers due to the GraphQL query and can help pinpointing performance problems in certain GraphQL queries.
For this SQL query we can see the list of parent spans containing the “Cart” resolver inside the “Cart” GraphQL query.
Check out the 5.0.62 release (changelog), which contains a few other improvements to Magento 2 instrumentation that greatly increase the monitoring and profiling insights into this e-commerce platform.