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

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 as code owners Aug 18, 2021
@google-cla google-cla bot added the cla: yes 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
Collaborator

@igorbernstein2 igorbernstein2 Oct 21, 2021

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
Collaborator

@igorbernstein2 igorbernstein2 Oct 21, 2021

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 label Oct 27, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 14c25cd into googleapis:main Oct 27, 2021
5 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants