Open scttnlsn opened 1 year ago
Did some experimentation with this and the source based approach seems to not work reliably since the location that triggers the query might not necessarily be where the query is constructed (i.e. at least in the case of lazy Django querysets). A better approach here might be seeing if there's any identifiable info in the ancestor spans.
Try adding Otel Django instrumentation and see if we can at least get info about the endpoint in which the query was executed.
Have the
Collector
save stack trace info. Can we use the stack trace to find (or at least approximate) where the query originated? Right now we just show the test that triggered the execution but would be nice to point to app code if possible.