Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,10 @@ public ApiFuture<List<KeyOffset>> futureCall(String s, ApiCallContext apiCallCon
withStatsHeaders = new StatsHeadersUnaryCallable<>(spoolable);

UnaryCallable<com.google.bigtable.v2.SampleRowKeysRequest, List<SampleRowKeysResponse>>
withBigtableTracer = new BigtableTracerUnaryCallable<>(withStatsHeaders);
withAttemptTracer = new BigtableTracerUnaryCallable<>(withStatsHeaders);

UnaryCallable<com.google.bigtable.v2.SampleRowKeysRequest, List<SampleRowKeysResponse>>
retryable = withRetries(withBigtableTracer, settings.sampleRowKeysSettings());
retryable = withRetries(withAttemptTracer, settings.sampleRowKeysSettings());

return createUserFacingUnaryCallable(
methodName,
Expand Down Expand Up @@ -774,7 +774,7 @@ private UnaryCallable<BulkMutation, MutateRowsAttemptResult> createMutateRowsBas
ServerStreamingCallable<MutateRowsRequest, MutateRowsResponse> convertException =
new ConvertExceptionCallable<>(callable);

ServerStreamingCallable<MutateRowsRequest, MutateRowsResponse> withBigtableTracer =
ServerStreamingCallable<MutateRowsRequest, MutateRowsResponse> withAttemptTracer =
new BigtableTracerStreamingCallable<>(convertException);

BasicResultRetryAlgorithm<MutateRowsAttemptResult> resultRetryAlgorithm;
Expand All @@ -797,7 +797,7 @@ private UnaryCallable<BulkMutation, MutateRowsAttemptResult> createMutateRowsBas
UnaryCallable<MutateRowsRequest, MutateRowsAttemptResult> baseCallable =
new MutateRowsRetryingCallable(
clientContext.getDefaultCallContext(),
withBigtableTracer,
withAttemptTracer,
retryingExecutor,
settings.bulkMutateRowsSettings().getRetryableCodes(),
retryAlgorithm);
Expand Down Expand Up @@ -1033,11 +1033,11 @@ private UnaryCallable<ReadModifyWriteRow, Row> createReadModifyWriteRowCallable(
ServerStreamingCallable<String, ByteStringRange> watched =
Callables.watched(convertException, innerSettings, clientContext);

ServerStreamingCallable<String, ByteStringRange> withBigtableTracer =
ServerStreamingCallable<String, ByteStringRange> withAttemptTracer =
new BigtableTracerStreamingCallable<>(watched);

ServerStreamingCallable<String, ByteStringRange> retrying =
withRetries(withBigtableTracer, innerSettings);
withRetries(withAttemptTracer, innerSettings);

SpanName span = getSpanName("GenerateInitialChangeStreamPartitions");
ServerStreamingCallable<String, ByteStringRange> traced =
Expand Down Expand Up @@ -1105,11 +1105,11 @@ private UnaryCallable<ReadModifyWriteRow, Row> createReadModifyWriteRowCallable(
ServerStreamingCallable<ReadChangeStreamRequest, ChangeStreamRecordT> watched =
Callables.watched(merging, innerSettings, clientContext);

ServerStreamingCallable<ReadChangeStreamRequest, ChangeStreamRecordT> withBigtableTracer =
ServerStreamingCallable<ReadChangeStreamRequest, ChangeStreamRecordT> withAttemptTracer =
new BigtableTracerStreamingCallable<>(watched);

ServerStreamingCallable<ReadChangeStreamRequest, ChangeStreamRecordT> readChangeStreamCallable =
withRetries(withBigtableTracer, innerSettings);
withRetries(withAttemptTracer, innerSettings);

ServerStreamingCallable<ReadChangeStreamQuery, ChangeStreamRecordT>
readChangeStreamUserCallable =
Expand Down Expand Up @@ -1175,6 +1175,9 @@ public Map<String, String> extract(ExecuteQueryRequest executeQueryRequest) {
ServerStreamingCallable<ExecuteQueryCallContext, ExecuteQueryResponse> convertException =
new ConvertExceptionCallable<>(withPlanRefresh);

ServerStreamingCallable<ExecuteQueryCallContext, ExecuteQueryResponse> withAttemptTracer =
new BigtableTracerStreamingCallable<>(convertException);

ServerStreamingCallSettings<ExecuteQueryCallContext, ExecuteQueryResponse> retrySettings =
ServerStreamingCallSettings.<ExecuteQueryCallContext, ExecuteQueryResponse>newBuilder()
.setResumptionStrategy(new ExecuteQueryResumptionStrategy())
Expand All @@ -1189,7 +1192,7 @@ public Map<String, String> extract(ExecuteQueryRequest executeQueryRequest) {
// attempt stream will have reset set to true, so any unyielded data from the previous
// attempt will be reset properly
ServerStreamingCallable<ExecuteQueryCallContext, ExecuteQueryResponse> retries =
withRetries(convertException, retrySettings);
withRetries(withAttemptTracer, retrySettings);

ServerStreamingCallable<ExecuteQueryCallContext, SqlRow> merging =
new SqlRowMergingCallable(retries);
Expand All @@ -1208,13 +1211,10 @@ public Map<String, String> extract(ExecuteQueryRequest executeQueryRequest) {
ServerStreamingCallable<ExecuteQueryCallContext, SqlRow> passingThroughErrorsToMetadata =
new MetadataErrorHandlingCallable(watched);

ServerStreamingCallable<ExecuteQueryCallContext, SqlRow> withBigtableTracer =
new BigtableTracerStreamingCallable<>(passingThroughErrorsToMetadata);

SpanName span = getSpanName("ExecuteQuery");
ServerStreamingCallable<ExecuteQueryCallContext, SqlRow> traced =
new TracedServerStreamingCallable<>(
withBigtableTracer, clientContext.getTracerFactory(), span);
passingThroughErrorsToMetadata, clientContext.getTracerFactory(), span);

return new ExecuteQueryCallable(
traced.withDefaultCallContext(
Expand Down
Loading