Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing's span could be propagated through RPC to Sqlite worker #2876

Closed
Andrepuel opened this issue Nov 14, 2023 · 0 comments · Fixed by #3056
Closed

tracing's span could be propagated through RPC to Sqlite worker #2876

Andrepuel opened this issue Nov 14, 2023 · 0 comments · Fixed by #3056
Labels
enhancement New feature or request

Comments

@Andrepuel
Copy link

On Mysql driver, when a span is entered, given that the appropriate care is taken regarding asynchronous functions, then all the events will be sent using the span that was entered.

Sqlite driver, however, will always emit events on the root span. This seems to be related to the fact that the actual queries are executed in another thread in a worker. The worker does not know which span was entered when the original caller sent the request.

My proposal is that the current span should be sent alongside the work request so that the worker may enter the same span that was entered on the caller site.

I think the effort could be concentrated in the Command enum: https://github.com/launchbadge/sqlx/blob/v0.7.1/sqlx-sqlite/src/connection/worker.rs#L42 .

@Andrepuel Andrepuel added the enhancement New feature or request label Nov 14, 2023
zoomiti added a commit to zoomiti/sqlx that referenced this issue Feb 12, 2024
abonander pushed a commit that referenced this issue Feb 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
kukabi pushed a commit to helikon-labs/sqlx that referenced this issue Feb 22, 2024

Verified

This commit was signed with the committer’s verified signature.
kukabi Kutsal Kaan Bilgin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant