Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

feat: add batch throttled time to tracer #1463

Merged
merged 7 commits into from Oct 27, 2021

Conversation

mutianf
Copy link
Contributor

@mutianf mutianf commented Aug 18, 2021

Add ApiTracer#batchRequestThrottled to track total throttled time of a batch. In BatcherImpl, add throttled time to ApiCallContext so it can be accessed from callable chains and recorded in ApiTracer.

@mutianf mutianf requested review from a team as code owners August 18, 2021 16:02
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 18, 2021
@@ -93,6 +95,7 @@
private SettableApiFuture<Void> closeFuture;
private final BatcherStats batcherStats = new BatcherStats();
private final FlowController flowController;
private ApiCallContext callContext;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be final

if (callContext != null) {
callContext =
callContext.withOption(THROTTLED_TIME_KEY, accumulatedBatch.totalThrottledTimeMs);
unaryCallable.withDefaultCallContext(callContext);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a typo

@igorbernstein2 igorbernstein2 added the automerge Merge the pull request once unit tests and other checks pass. label Oct 27, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 14c25cd into googleapis:main Oct 27, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants