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

Replace latest_trace_id by tx_start_traceparent #16

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

bonnefoa
Copy link
Collaborator

@bonnefoa bonnefoa commented Jun 3, 2024

If the start of a transaction has a trace_context, we want to reuse it for the whole transaction. Replace latest_trace_id by tx_start_traceparent which will only be set at the start of a new transaction and update it with both randomly generated trace_id and extracted_trace_id from SQLComments.

If a statement has its own tracecontext, we give it priority.

This fixes the issue #13 where latest_trace_id was not updated when trace_id was provided by SQLComment, leading to creating spans with a 0 trace_id.

If the start of a transaction has a trace_context, we want to reuse it
for the whole transaction. Replace latest_trace_id by
tx_start_traceparent which will only be set at the start of a new
transaction and update it with both randomly generated trace_id and
extracted_trace_id from SQLComments.

If a statement has its own trace_context, we give it priority.

This fixes the issue #13 where latest_trace_id was not updated when
trace_id was provided by SQLComment, leading to creating spans with a 0
trace_id.
@bonnefoa bonnefoa merged commit 43a30fc into main Jun 3, 2024
3 checks passed
@bonnefoa bonnefoa deleted the fix-multistatement-query branch June 3, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant