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

fix(bigquery): do not override ctx within inner span creation #11119

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

alvarowolfx
Copy link
Contributor

When creating child spans (mostly inside runWithRetry func), parent context.Context was being override by the child span context.Context, making the parent span to be missing on traces. This PR changes the ctx assignment inside those runWithRetry to always create a new context.Context just for that child span, similar to how it was done in other places like

sCtx := trace.StartSpan(ctx, "bigquery.jobs.cancel")

Fixes #10961

@alvarowolfx alvarowolfx requested review from a team as code owners November 12, 2024 20:31
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Nov 12, 2024
@alvarowolfx alvarowolfx changed the title fix(bigquery): do not override ctx within inner span fix(bigquery): do not override ctx within inner span creation Nov 12, 2024
@alvarowolfx alvarowolfx added the automerge Merge the pull request once unit tests and other checks pass. label Nov 14, 2024
@alvarowolfx alvarowolfx added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 18, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 18, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit 627c69a into googleapis:main Nov 18, 2024
5 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigquery: missing span
3 participants