-
-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add query source support to
sentry-rails
(#2313)
* Support query source in ActiveRecord spans This change mimics Rails' ActiveRecord::LogSubscriber to extract the source of the query and add it to the span data. The added source information can then be displayed along with the query SQL in the Sentry UI. The feature only works with Ruby 3.2+ and Rails 7.1+. * Make the query source location feature toggleable * Only record query source if it takes longer than db_query_source_threshold_ms This avoids the overhead of recording the source in fast queries, which in general don't need to be traced. The threshold is configurable via `config.rails.db_query_source_threshold_ms` and the default is 100ms. * Update changelog
- Loading branch information
Showing
5 changed files
with
170 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters