You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using the EF Core diagnostic subscriber implementation with Pomelo (might also apply to SQL Server, I haven't checked), the APM logs SQL queries as "Open" and "Execute" in the waterfall. Clicking the items shows that the APM did in fact log the query, but it's hard to see at a glance what's what.
Describe the solution you'd like
It would be great if some more informative operation names could be generated from the known statements, eg:
Describe alternatives you've considered
Using the full query would be too long in general for meaningful use, so table names would be the best. My proposed solution below only grabs the first keyword and most tables in a query. It's enough to distinguish queries in a row reasonably well.
Open statements might also benefit from having the host of the database connection appended in case there are multiple connections, but might be unnecessary.
Additional context
from my initial experimentation this can be adequately handled using some fairly simple regex functions (verified with MySQL, might work with SQL Server as well, but regex might be not the best way to handle this, as convenient as it is):
Actually, does this even come from the EfCoreDiagnosticListener? I don't have a reference to Elastic.Apm.EntityFrameworkCore (not even an indirect one, just Elastic.Apm.AspNetCore and the related packages) and seems to pick up those traces anyway...
Okay so this probably applies to both the default implementation and the OpenTelemetryBridge. I wonder, can we post-process traces from the OTel bridge?
Is your feature request related to a problem? Please describe.
When using the EF Core diagnostic subscriber implementation with Pomelo (might also apply to SQL Server, I haven't checked), the APM logs SQL queries as "Open" and "Execute" in the waterfall. Clicking the items shows that the APM did in fact log the query, but it's hard to see at a glance what's what.
Describe the solution you'd like
It would be great if some more informative operation names could be generated from the known statements, eg:
so it would be along the lines of:
Describe alternatives you've considered
Using the full query would be too long in general for meaningful use, so table names would be the best. My proposed solution below only grabs the first keyword and most tables in a query. It's enough to distinguish queries in a row reasonably well.
Open statements might also benefit from having the host of the database connection appended in case there are multiple connections, but might be unnecessary.
Additional context
from my initial experimentation this can be adequately handled using some fairly simple regex functions (verified with MySQL, might work with SQL Server as well, but regex might be not the best way to handle this, as convenient as it is):
The text was updated successfully, but these errors were encountered: