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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
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. automerge Merge the pull request once unit tests and other checks pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigquery: missing span
2 participants