hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1842) OpenTracing integration
Date Thu, 04 May 2017 11:27:04 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15996573#comment-15996573
] 

Oleg Kalnichevski commented on HTTPCLIENT-1842:
-----------------------------------------------

[~pavol.loffay] 

I completed the first cut at request exec interceptors in SVN trunk for both classic and async
client APIs. Please take a look and let me know if the new APIs make OpenTracing integration
easier
https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientInterceptors.java
https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java

For now I suggest we do not pull your code into the project given that the reservations expressed
above. Let's see where we stand when HttpClient 5.0 nears GA. What we could do is to place
a link to OT project prominently on the project web site. Disclaimer: HC project web site
is outright hideous, so it is unclear if a placement on it represents an advantage or a liability.


Oleg 

> OpenTracing integration
> -----------------------
>
>                 Key: HTTPCLIENT-1842
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1842
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient (async), HttpClient (classic)
>            Reporter: Pavol Loffay
>             Fix For: 5.0
>
>
> Hello, 
> I am working on OpenTracing [1] integraton for {{HttpClient}} client. My current POC
is in [2]. I have a couple of questions and suggestions for next version to make the tracing
integration better and cleaner.
> First I was using interceptors but response interceptor is not invoked on exceptions
e.g. {{UnknownHostException}}. 
> Now I decided to extend {{HttpClientBuilder}} and override {{decorateProtocolExec}} but
the problem is that {{RedirectExec}} is added aftewards so tracing {{ClientExecChain}} gets
called multiple times and should be only one.  Note that tracing {{ClientExecChain}} requires
access to redirectStrategy/redirectCount/redirectDisabled to create only one span for the
whole request (this makes the integration quite nasty).
> In general there are these requirements to make the integration work properly:
> 1. for the whole invocation call request and response interceptor only once, or be able
to add tracing {{ClientExecChain}} as the last one in builder.
> 2. be able to access thread local variable from an interceptor/ClientExecChain to connect
client span with a server span
> 3. be able to intercept thrown exceptios e.g. {{UnknownHostException}}
> [1]: http://opentracing.io/
> [2]: https://github.com/pavolloffay/java-apache-httpcomponents



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message