-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EF Core statement extraction #2344
Labels
Comments
Actually, does this even come from the |
Okay so this probably applies to both the default implementation and the OpenTelemetryBridge. I wonder, can we post-process traces from the OTel bridge? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: