public final class ReactorNettyHttpTracing extends Object
ReactorNettyHttpTracing reactorNettyHttpTracing = ReactorNettyHttpTracing.create(httpTracing);
HttpClient client = reactorNettyHttpTracing.decorateHttpClient(HttpClient.create().port(0)...);
HttpServer server = reactorNettyHttpTracing.decorateHttpServer(HttpServer.create().port(0)...);
Modifier and Type | Method and Description |
---|---|
static ReactorNettyHttpTracing |
create(brave.http.HttpTracing httpTracing)
Create a new
ReactorNettyHttpTracing using a preconfigured HttpTracing instance. |
static ReactorNettyHttpTracing |
create(brave.http.HttpTracing httpTracing,
java.util.function.Function<String,String> uriMapping)
Create a new
ReactorNettyHttpTracing using a preconfigured HttpTracing instance. |
HttpClient |
decorateHttpClient(HttpClient client)
Returns a decorated
HttpClient in order to enable Brave instrumentation. |
HttpServer |
decorateHttpServer(HttpServer server)
Returns a decorated
HttpServer in order to enable Brave instrumentation. |
public static ReactorNettyHttpTracing create(brave.http.HttpTracing httpTracing)
ReactorNettyHttpTracing
using a preconfigured HttpTracing
instance.httpTracing
- a preconfigured HttpTracing
instanceReactorNettyHttpTracing
public static ReactorNettyHttpTracing create(brave.http.HttpTracing httpTracing, java.util.function.Function<String,String> uriMapping)
ReactorNettyHttpTracing
using a preconfigured HttpTracing
instance.
uriMapping
function receives the actual uri and returns the target uri value
that will be used for the tracing.
For example instead of using the actual uri "/users/1"
as uri value, templated uri
"/users/{id}"
can be used.
httpTracing
- a preconfigured HttpTracing
instanceuriMapping
- a function that receives the actual uri and returns the target uri value
that will be used for the tracingReactorNettyHttpTracing
public HttpClient decorateHttpClient(HttpClient client)
HttpClient
in order to enable Brave instrumentation.client
- a client to decorateHttpClient
public HttpServer decorateHttpServer(HttpServer server)
HttpServer
in order to enable Brave instrumentation.server
- a server to decorateHttpServer