Tracing Queries via telemetry:span/3

129 views
Skip to first unread message

Isaac Sanders

unread,
Jun 18, 2021, 4:45:55 PM6/18/21
to elixi...@googlegroups.com
I think we should implement spans in ecto using the telemetry span function.

Currently the telemetry event contains a number of durations without more concrete span timing, and I think it might be useful to see that.

Thoughts?

- Isaac

José Valim

unread,
Jun 18, 2021, 5:09:04 PM6/18/21
to elixi...@googlegroups.com
Hard to achieve in practice because there are many timings in a query and they may happen over different processes. For example, queue time vs query time vs decode time (and the additional time that we add).

--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/1DDB7B1F-B6A8-4CA1-8269-0C6043080EE3%40isaacbfsanders.com.

is...@isaacbfsanders.com

unread,
Jun 18, 2021, 6:50:02 PM6/18/21
to elixir-ecto

I think it is fair to say it would be quite hard to manage the various layers of DBConnection for a trace/span.

Would a single `[:ecto, :query]` span be similarly difficult/troublesome?

José Valim

unread,
Jun 19, 2021, 3:22:57 AM6/19/21
to elixi...@googlegroups.com
It may be more doable but it also may need to be implemented by hand rather than :telemetry.span. Someone would need to give it a try!

Reply all
Reply to author
Forward
0 new messages