Class LoggingTracerFactory (2.79.0)

public class LoggingTracerFactory implements ApiTracerFactory

A ApiTracerFactory that creates instances of LoggingTracer. This class is intended for internal framework use only. Manual instantiation is discouraged; the lifecycle is managed automatically by the system, when LoggingUtils#isLoggingEnabled() returning true.

Inheritance

java.lang.Object > LoggingTracerFactory

Implements

ApiTracerFactory

Constructors

LoggingTracerFactory()

public LoggingTracerFactory()

Methods

needsContext()

public boolean needsContext()

Indicates whether this factory requires an ApiTracerContext to be injected via #withContext(ApiTracerContext) before creating tracers.

Returns
Type Description
boolean

newTracer(ApiTracer parent, ApiTracerContext context)

public ApiTracer newTracer(ApiTracer parent, ApiTracerContext context)

Create a new ApiTracer that will be a child of the current context.

Parameters
Name Description
parent ApiTracer
context ApiTracerContext
Returns
Type Description
ApiTracer

newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType)

public ApiTracer newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType)

Create a new ApiTracer that will be a child of the current context.

Parameters
Name Description
parent ApiTracer
spanName SpanName
operationType ApiTracerFactory.OperationType
Returns
Type Description
ApiTracer

withContext(ApiTracerContext context)

public ApiTracerFactory withContext(ApiTracerContext context)

Returns a new ApiTracerFactory that will use the provided context to infer attributes for all tracers created by the factory.

Parameter
Name Description
context ApiTracerContext
Returns
Type Description
ApiTracerFactory