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

Client instrumentation does not finish spans after ConnectionException #79

Closed
mabn opened this issue Mar 14, 2018 · 1 comment
Closed

Comments

@mabn
Copy link

mabn commented Mar 14, 2018

It seems that ClientTracingFilter.filter(request, response) is not called after:
javax.ws.rs.ProcessingException: java.net.ConnectException: Connection refused (Connection refused)

ClientRuntime.invoke from jersey client:

    public ClientResponse invoke(final ClientRequest request) {
        ClientResponse response;
        try {
            try {
                response = connector.apply(addUserAgent(Stages.process(request, requestProcessingRoot), connector.getName()));
            } catch (final AbortException aborted) {
                response = aborted.getAbortResponse();
            }

            return Stages.process(response, responseProcessingRoot);
        } catch (final ProcessingException pe) {
            throw pe;
        } catch (final Throwable t) {
            throw new ProcessingException(t.getMessage(), t);
        }
    }

The exception is thrown from the line with response = conn... and the execution skips over Stages.process(response, responseProcessingRoot) which would run the filter.

Maybe there is some other mechanism which can react to this exception.

@mabn mabn changed the title Client instrumentation does not finish span after ConnectionException Client instrumentation does not finish spans after ConnectionException Mar 14, 2018
@mabn
Copy link
Author

mabn commented Mar 14, 2018

Oh, it's already reported under #30
I'm closing this.

Although not being able to handle exceptions will leave ScopeManager with a scope opened by the request filter.

@mabn mabn closed this as completed Mar 14, 2018
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

No branches or pull requests

1 participant