vaadin / observability-kit

Other
5 stars 2 forks source link

fix: re-enable http-client instrumentations #130

Closed sissbruecker closed 1 year ago

sissbruecker commented 1 year ago

The http-client instrumentations' purpose seems to be to instrument classes that are used for outgoing HTTP requests, rather than incoming ones. By disabling them we likely break the distributed tracing feature of OpenTelemetry, as they will not be able to set trace and parent ID on outgoing requests. Let's restore them.

java-http-client

An HttpClient can be used to send requests and retrieve their responses. An HttpClient is created through a builder. The builder can be used to configure per-client state, like: the preferred protocol version ( HTTP/1.1 or HTTP/2 ), whether to follow redirects, a proxy, an authenticator, etc. Once built, an HttpClient is immutable, and can be used to send multiple requests.

jetty-http-client

HttpClient provides an efficient, asynchronous, non-blocking implementation to perform HTTP requests to a server through a simple API that offers also blocking semantic. HttpClient provides easy-to-use methods such as GET(String) that allow to perform HTTP requests in a one-liner, but also gives the ability to fine tune the configuration of requests via newRequest(URI).