Filename and linenumber as comment in generated sql

Hey @gregvaughn if you search for stacktrace on this page here Ecto.Repo — Ecto v3.10.3 you’ll see that you can supply a stacktrace: true option to your repo config. When you do, your Ecto Repo telemetry events include the stack trace of where the query was called from. We use this both when logging queries as well as when we emit otel traces related to queries.

Does this accomplish what you’re looking for?

3 Likes