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

When Tracer.completeSpan() result is unused, prefer fastCompleteSpan #85

Merged
merged 1 commit into from
Mar 4, 2019

Conversation

carterkozak
Copy link
Contributor

The latter avoids work when operations are not sampled, which is
significantly more common than sampling.

Added error-prone annotations to validate correct usage.

The latter avoids work when operations are not sampled, which is
significantly more common than sampling.

Added error-prone annotations to validate correct usage.
@carterkozak carterkozak requested a review from a team as a code owner March 1, 2019 19:33
@@ -56,7 +56,7 @@ public Response intercept(Chain chain) throws IOException {
try {
response = chain.proceed(tracedRequest.build());
} finally {
Tracer.completeSpan();
Tracer.fastCompleteSpan();
Copy link
Contributor Author

@carterkozak carterkozak Mar 1, 2019

Choose a reason for hiding this comment

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

Only usage change in main sources

@carterkozak carterkozak requested review from dsd987 and esword March 1, 2019 19:38
*/
@CheckReturnValue
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 this is a pretty neat way of ensuring we don't do unused work :)

@iamdanfox
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit c37d9fe into develop Mar 4, 2019
@bulldozer-bot bulldozer-bot bot deleted the prefer_fast_complete_span branch March 4, 2019 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants