Class OpenTelemetryService

  • All Implemented Interfaces:
    com.linecorp.armeria.common.util.Unwrappable, com.linecorp.armeria.server.HttpService, com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,​com.linecorp.armeria.common.HttpResponse>

    public class OpenTelemetryService
    extends com.linecorp.armeria.server.SimpleDecoratingHttpService
    Decorates an HttpService to trace inbound HttpRequests.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Function<? super com.linecorp.armeria.server.HttpService,​OpenTelemetryService> newDecorator()
      Creates a new tracing HttpService decorator using the default Tracer.
      static Function<? super com.linecorp.armeria.server.HttpService,​OpenTelemetryService> newDecorator​(io.opentelemetry.api.trace.Tracer tracer)
      Creates a new tracing HttpService decorator using the specified Tracer.
      static Function<? super com.linecorp.armeria.server.HttpService,​OpenTelemetryService> newDecorator​(ArmeriaServerTracer serverTracer)
      Creates a new tracing HttpService decorator using the specified ArmeriaServerTracer.
      com.linecorp.armeria.common.HttpResponse serve​(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req)  
      • Methods inherited from class com.linecorp.armeria.server.DecoratingService

        serviceAdded, shouldCachePath
      • Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable

        as, toString, unwrap
      • Methods inherited from interface com.linecorp.armeria.server.HttpService

        decorate, decorate
      • Methods inherited from interface com.linecorp.armeria.server.Service

        as, serviceAdded, shouldCachePath, unwrap
    • Method Detail

      • newDecorator

        public static Function<? super com.linecorp.armeria.server.HttpService,​OpenTelemetryService> newDecorator()
        Creates a new tracing HttpService decorator using the default Tracer.
      • newDecorator

        public static Function<? super com.linecorp.armeria.server.HttpService,​OpenTelemetryService> newDecorator​(io.opentelemetry.api.trace.Tracer tracer)
        Creates a new tracing HttpService decorator using the specified Tracer.
      • serve

        public com.linecorp.armeria.common.HttpResponse serve​(com.linecorp.armeria.server.ServiceRequestContext ctx,
                                                              com.linecorp.armeria.common.HttpRequest req)
                                                       throws Exception
        Throws:
        Exception