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

Ensures current span is always closed prior to finishing #393

Merged
merged 1 commit into from May 7, 2017

Conversation

codefromthecrypt
Copy link
Member

This changes logic in http handlers such that a span is always closed
prior to being finished. This has two advantages: one is that we can
test that instrumentation do not leak span contexts. Another is that
log context synchronization will not add trace IDs of a closed span.

@codefromthecrypt codefromthecrypt mentioned this pull request May 7, 2017
11 tasks
@codefromthecrypt
Copy link
Member Author

note I tried to pay for this change by removing duplicate logic in tests

@@ -12,35 +13,25 @@ public HttpClientHandler(HttpAdapter<Req, Resp> adapter, HttpClientParser parser
this.parser = parser;
}

public Req handleSend(Req request, Span span) {
if (span.isNoop()) return request;
public void handleSend(Req request, Span span) {
Copy link
Member Author

Choose a reason for hiding this comment

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

these return values weren't used, or when used encouraged people to use a span in scope.

@codefromthecrypt codefromthecrypt force-pushed the close-scope branch 2 times, most recently from 462461f to f382cec Compare May 7, 2017 08:31
This changes logic in http handlers such that a span is always closed
prior to being finished. This has two advantages: one is that we can
test that instrumentation do not leak span contexts. Another is that
log context synchronization will not add trace IDs of a closed span.
@codefromthecrypt
Copy link
Member Author

boatload of test backfills next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant