Skip to content

Add sql.origin to SQL query spans #398

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

Merged
merged 6 commits into from
Apr 27, 2021

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Oct 9, 2020

This PR adds sql.origin to the data of a SQL query tracing span which would contain the file path and line number from where to SQL query originated from in the code of the user.

Why? So you can quickly see and or jump the the code where a potential problematic query is coming from instead of only seeing the query that was executed.


Disclaimer: This is a work in progress and possibly will only be merged after support in Sentry server is introduces for this, but nice to have a PoC and see if we can get some feedback on how to improve this or how to get the source line more efficiently.

@stayallive stayallive force-pushed the feature/add-sql-origin-to-query-tracing-span branch from e763b2e to d8b61a3 Compare October 9, 2020 12:09
@stayallive stayallive marked this pull request as ready for review April 27, 2021 07:41
# Conflicts:
#	src/Sentry/Laravel/Tracing/EventHandler.php
#	src/Sentry/Laravel/Tracing/ServiceProvider.php
#	test/Sentry/Tracing/EventHandlerTest.php
@stayallive stayallive merged commit bbbda4c into master Apr 27, 2021
@stayallive stayallive deleted the feature/add-sql-origin-to-query-tracing-span branch April 27, 2021 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant