Class BraveClient

java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<com.linecorp.armeria.client.Client<T_I,T_O>>
com.linecorp.armeria.client.DecoratingClient<I,O,I,O>
com.linecorp.armeria.client.SimpleDecoratingClient<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
com.linecorp.armeria.client.SimpleDecoratingHttpClient
com.linecorp.armeria.client.brave.BraveClient
All Implemented Interfaces:
com.linecorp.armeria.client.Client<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>, com.linecorp.armeria.client.HttpClient, com.linecorp.armeria.common.util.Unwrappable

public final class BraveClient extends com.linecorp.armeria.client.SimpleDecoratingHttpClient
Decorates an HttpClient to trace outbound HttpRequests using Brave.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.linecorp.armeria.common.HttpResponse
    execute(com.linecorp.armeria.client.ClientRequestContext ctx, com.linecorp.armeria.common.HttpRequest req)
     
    static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient>
    Creates a new tracing HttpClient decorator using the specified HttpTracing instance.
    static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient>
    newDecorator(brave.Tracing tracing)
    Creates a new tracing HttpClient decorator using the specified Tracing instance.
    static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient>
    newDecorator(brave.Tracing tracing, @Nullable String remoteServiceName)
    Creates a new tracing HttpClient decorator using the specified Tracing instance and the remote service name.

    Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable

    as, toString, unwrap, unwrapAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.linecorp.armeria.client.Client

    as, unwrap

    Methods inherited from interface com.linecorp.armeria.common.util.Unwrappable

    equalsIgnoreWrapper, unwrapAll
  • Method Details

    • newDecorator

      public static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient> newDecorator(brave.Tracing tracing)
      Creates a new tracing HttpClient decorator using the specified Tracing instance.
    • newDecorator

      public static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient> newDecorator(brave.Tracing tracing, @Nullable @Nullable String remoteServiceName)
      Creates a new tracing HttpClient decorator using the specified Tracing instance and the remote service name.
    • newDecorator

      public static Function<? super com.linecorp.armeria.client.HttpClient,BraveClient> newDecorator(HttpTracing httpTracing)
      Creates a new tracing HttpClient decorator using the specified HttpTracing instance.
    • execute

      public com.linecorp.armeria.common.HttpResponse execute(com.linecorp.armeria.client.ClientRequestContext ctx, com.linecorp.armeria.common.HttpRequest req) throws Exception
      Throws:
      Exception