[.Net] One API doesn't track MySQL calls and other does. Both using .Net

We have two APIs. One shows the MySQL trace time and the other doesn’t. I want them to both show the MySQL tracing times. Both apps use .Net. What do I need to do to enable this tracing on the other app? Both apps show tracing for .Net CLR and response time. What is the source of the difference?

Hey @tarrowsmith,

Thanks for your post here on the forums! I am wondering if both APIs are using the same MySQL driver. The supported ones are listed here:

If they are the same, can you send a link to each app please so I can take a closer look? Any APM link you post here will be viewable by New Relic support only.

Thanks!

1 Like

Sorry for the delay. Still can’t figure this out.
Interesting new data point is that both projects show MySQL queries in the development tiers.

This production project works: https://one.newrelic.com/launcher/nr1-core.explorer?platform[accountId]=1772093&platform[timeRange][duration]=1800000&platform[$isFallbackTimeRange]=true&pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJpc092ZXJ2aWV3Ijp0cnVlLCJyZWZlcnJlcnMiOnsibGF1bmNoZXJJZCI6Im5yMS1jb3JlLmV4cGxvcmVyIiwibmVyZGxldElkIjoibnIxLWNvcmUubGlzdGluZyJ9LCJlbnRpdHlJZCI6Ik1UYzNNakE1TTN4QlVFMThRVkJRVEVsRFFWUkpUMDU4T1RnNE9UZzROVFl6In0=&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwiZW50aXR5SWQiOiJNVGMzTWpBNU0zeEJVRTE4UVZCUVRFbERRVlJKVDA1OE9UZzRPVGc0TlRZeiIsInNlbGVjdGVkTmVyZGxldCI6eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJpc092ZXJ2aWV3Ijp0cnVlfX0=

This production project doesn’t: https://one.newrelic.com/launcher/nr1-core.explorer?platform[tvMode]=false&platform[accountId]=1772093&platform[timeRange][duration]=1800000&platform[$isFallbackTimeRange]=true&launcher=eyJzZWxlY3RlZEluc3RhbmNlIjpudWxsLCJ0cmFuc2FjdGlvblR5cGUiOm51bGx9&pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlJZCI6Ik1UYzNNakE1TTN4QlVFMThRVkJRVEVsRFFWUkpUMDU4TVRBd016a3pNRGMwTlEifQ==&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwiZW50aXR5SWQiOiJNVGMzTWpBNU0zeEJVRTE4UVZCUVRFbERRVlJKVDA1OE1UQXdNemt6TURjME5RIiwic2VsZWN0ZWROZXJkbGV0Ijp7Im5lcmRsZXRJZCI6ImFwbS1uZXJkbGV0cy5vdmVydmlldyJ9fQ==

In development I see everything: https://one.newrelic.com/launcher/nr1-core.explorer?platform[tvMode]=false&platform[accountId]=1772093&platform[timeRange][duration]=1800000&platform[$isFallbackTimeRange]=true&launcher=eyJzZWxlY3RlZEluc3RhbmNlIjpudWxsLCJ0cmFuc2FjdGlvblR5cGUiOm51bGx9&pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlJZCI6Ik1UYzNNakE1TTN4QlVFMThRVkJRVEVsRFFWUkpUMDU4TVRFMU1EYzBOekk1T0EifQ==&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwiZW50aXR5SWQiOiJNVGMzTWpBNU0zeEJVRTE4UVZCUVRFbERRVlJKVDA1OE1URTFNRGMwTnpJNU9BIiwic2VsZWN0ZWROZXJkbGV0Ijp7Im5lcmRsZXRJZCI6ImFwbS1uZXJkbGV0cy5vdmVydmlldyJ9fQ==

The reason Dev has more insight is we have the XML extension file there. I don’t want to add that on production.

Hey @tarrowsmith — thanks for the links, and sorry about the delay.

Can you let me know more about this XML extension file? Is this a custom instrumentation file you have added? If the database queries are being called by a method that is not being automatically instrumented (due to custom code or an unsupported framework), you may need to add custom instrumentation to begin instrumenting that method which could also capture database metrics.

Otherwise, the database calls would be considered to fall outside of a transaction and will not make it over to New Relic APM. See: Custom instrumentation | New Relic Documentation

1 Like

Yes, it is a custom instrumentation file that is not on production.
The system not showing SQL queries should be supported in my opinion. It uses .NET entity framework, which is one of the supported access methods for MySQL, right?
(Include=“MySql.Data.EntityFrameworkCore” Version=“8.0.21”)
The app that works is using MySql.Data version 8.0.20.

@tarrowsmith,

Sorry I missed this. I believe you narrowed down the issue, which is that at this point, while we have support for Entity Framework, our product does not support EntityFrameworkCore.

I would recommend adding an Enhancement Request on our agent’s Github page where it can be tracked, where you can include information about your use-case and the importance of this feature to your team. Our product managers also monitor these requests when prioritizing improvements to the software.

I’m sorry I don’t have better news.