Interface ApiTracerFactory (2.76.0)

  public 
  
 interface 
 ApiTracerFactory 
 

A factory to create new instances of ApiTracer s.

In general a single instance of an ApiTracer will correspond to a single logical operation.

For internal use only. google-cloud-java libraries should extend BaseApiTracerFactory .

Methods

getApiTracerContext()

  public 
  
 default 
  
 ApiTracerContext 
  
 getApiTracerContext 
 () 
 
Returns
Type
Description

the ApiTracerContext for this factory

newTracer(ApiTracer parent, ApiTracerContext tracerContext)

  public 
  
 default 
  
 ApiTracer 
  
 newTracer 
 ( 
 ApiTracer 
  
 parent 
 , 
  
 ApiTracerContext 
  
 tracerContext 
 ) 
 

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

Parameters
Name
Description
parent
ApiTracer

the parent of this tracer

tracerContext
ApiTracerContext

the method-definition-specific tracer context

Returns
Type
Description

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

  public 
  
 abstract 
  
 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

the parent of this tracer

spanName
SpanName

the name of the new span

operationType
ApiTracerFactory.OperationType

the type of operation that the tracer will trace

Returns
Type
Description

withContext(ApiTracerContext context)

  public 
  
 default 
  
 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

an ApiTracerContext object containing information to construct attributes

Returns
Type
Description
Create a Mobile Website
View Site in Mobile | Classic
Share by: