I’m having some trouble isolating specific queries in the ‘Databases’ page within the APM console.
I’m not certain, but it seems to me like the report groups/names the queries based off the type of query and first table in the SQL statement (e.g.
SELECT products). This works well for 80% of the queries, but there are a few complex queries that I would like to track independently which share the same report name as less important queries.
Is there a way I can give specific queries a custom name so I can have an easier time tracking them within the APM? Currently I have the following thoughts:
- Use the newrelic_record_datastore_segment API request - but am not sure if this is what it was intended for.
- Create custom metrics/events to track the queries
I’m currently using the PHP Agent version: 18.104.22.168 (just noticed it is a bit dated so I will probably update to the newest version later this week), and am using MySQL.
Any advice is appreciated.