-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer the tracer span to the telemetry span
When processing an Ecto event, if both a tracer span and a telemetry span are present, use the tracer span as the parent. This should fix an issue where, when an Ecto transaction takes place inside an Ecto parallel preload, when the transaction's commit or rollback event attempts to close both its own span and the overarching transaction span (which would be the tracer parent, within the parallel preload's sub-process) it instead closes the transaction span's parent (which would be the telemetry parent, from the process that spawned the parallel preload) leaving the transaction span unclosed and potentially cutting the transaction short.
- Loading branch information
Showing
3 changed files
with
78 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: patch | ||
type: fix | ||
--- | ||
|
||
Fix an issue where Ecto transactions in parallel preloads would not be instrumented correctly when using `Appsignal.Ecto.Repo`, causing the query in the Ecto transaction to not be instrumented and the sample to be incorrectly closed as an earlier time. |
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