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
We may be able to enrich the ActiveRecord span and amend it as a Shared DB attribute for the driver itself however we do not currently use notifications in this instrumentation.
Worst case scenario, we monkey patch existing async methods, concurrency primitives.
It would also be great if we could include the lock_wait attribute too, which represents how much time is spent in the foreground waiting for the query to complete (in a true async query, it would be 0.0ms):
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.
ActiveRecord
7.1 introduced async query methods1, which leverages concurrency primitives viaPromise
API to defer executing queries.We would like to enrich
ActiveRecord
related spans to know whether or not they were executed from the async context.Additional Notes
The
sql.active_record
notification payload includes aasync
attribute:https://github.com/rails/rails/blob/616d3a7675c18ae2d38d3116de47e2e7308cfbd8/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#L1135
We may be able to enrich the
ActiveRecord
span and amend it as a Shared DB attribute for the driver itself however we do not currently use notifications in this instrumentation.Worst case scenario, we monkey patch existing
async
methods, concurrency primitives.Footnotes
https://github.com/rails/rails/pull/44446 ↩
The text was updated successfully, but these errors were encountered: