Class PayaraTracingServices
- java.lang.Object
-
- fish.payara.microprofile.telemetry.tracing.PayaraTracingServices
-
public final class PayaraTracingServices extends Object
This is a class hiding internal mechanism of lookup of HK2 services. The required services will be eagerly initialised using their service handles, and throwing an exception if the handle is available but not the service itself.- Author:
- David Matejcek
-
-
Constructor Summary
Constructors Constructor Description PayaraTracingServices()Initialise the tracing services if they are available.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.opentelemetry.api.trace.TracergetActiveTracer()static org.eclipse.microprofile.config.ConfiggetConfig()Gets the Config object for current application.DeploymentgetDeployment()OpenTelemetryServicegetOpenTelemetryService()RequestTracingServicegetRequestTracingService()booleanisTracingAvailable()
-
-
-
Constructor Detail
-
PayaraTracingServices
public PayaraTracingServices()
Initialise the tracing services if they are available.- Throws:
RuntimeException- if an exception occurs initialising the services.
-
-
Method Detail
-
getConfig
public static org.eclipse.microprofile.config.Config getConfig()
Gets the Config object for current application.- Returns:
- the Config object for this request, or null if no config could be found
-
isTracingAvailable
public boolean isTracingAvailable()
- Returns:
- true if the Request Tracing services are available and have been initialised, or false if the services are not available.
-
getRequestTracingService
public RequestTracingService getRequestTracingService()
- Returns:
RequestTracingService, or null if the HK2 service couldn't be initialised.
-
getOpenTelemetryService
public OpenTelemetryService getOpenTelemetryService()
- Returns:
OpenTracingService, or null if the HK2 service couldn't be initialised.
-
getDeployment
public Deployment getDeployment()
- Returns:
Deployment
-
getActiveTracer
public io.opentelemetry.api.trace.Tracer getActiveTracer()
- Returns:
- actually active
Tracerfor the current application, or null if the tracing service is not available.
-
-