Skip to content

Commit 0201802

Browse files
committed
Wrap in TraceActivityAsync call.
1 parent 4dfb28d commit 0201802

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

csharp/src/BigQueryStatement.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,9 +761,12 @@ private async Task<UpdateResult> ExecuteUpdateInternalAsync()
761761
{
762762
return await ExecuteCancellableJobAsync(context, activity, async (context) =>
763763
{
764-
context.Job = await this.Client.CreateQueryJobAsync(SqlQuery, null, null, context.CancellationToken).ConfigureAwait(false);
765-
activity?.AddBigQueryTag("job_id", context.Job.Reference.JobId);
766-
return await context.Job.GetQueryResultsAsync(getQueryResultsOptions, context.CancellationToken).ConfigureAwait(false);
764+
return await this.TraceActivityAsync(async activity =>
765+
{
766+
context.Job = await this.Client.CreateQueryJobAsync(SqlQuery, null, null, context.CancellationToken).ConfigureAwait(false);
767+
activity?.AddBigQueryTag("job_id", context.Job.Reference.JobId);
768+
return await context.Job.GetQueryResultsAsync(getQueryResultsOptions, context.CancellationToken).ConfigureAwait(false);
769+
}, ClassName + "." + nameof(ExecuteUpdateInternalAsync) + "." + nameof(BigQueryJob.GetQueryResultsAsync));
767770
}).ConfigureAwait(false);
768771
};
769772
BigQueryResults? result = await ExecuteWithRetriesAsync(getQueryResultsAsyncFunc, activity, context.CancellationToken);

0 commit comments

Comments
 (0)