Skip to content

Tracing for beginning of query for telemetry #174

Closed
@ksmithut

Description

@ksmithut

I've been digging into instrumenting our project with opentelemetry, and the tracing you've provided works great for getting metrics for queries already run, but I wonder what your appetite would be for adding traces in right before a query is executed? I'd be happy to jump in and add it in if you're open to the feature. It's helpful in our trace visualization tool to see where and when a query starts and end to see how it affects application performance in relation to concurrently running code. Also knowing the best place to add it in would be helpful. I see that the current traces happen in the check_for_error function, which won't run if you don't get an {:ok, cmd, response} response from DBConnection.execute. I wonder if DBConnection.execute would be the best place to put that? Or perhaps in something that gets called everywhere before DBConnection.execute gets called?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions