public final class CensusHttpModule
Provides utilities for Open Census to record http stats/trace information and propagate tracing context.
Constructors
CensusHttpModule(Tracer tracer, boolean isRecordEvents)
public CensusHttpModule(Tracer tracer, boolean isRecordEvents)
Creates a CensusHttpModule with given parameters.
Parameters | |
---|---|
Name | Description |
tracer |
io.opencensus.trace.Tracer the OpenCensus |
isRecordEvents |
boolean whether spans are stored locally. |
Methods
getHttpRequestInitializer(HttpRequestInitializer initializer)
public HttpRequestInitializer getHttpRequestInitializer(HttpRequestInitializer initializer)
Returns the HttpExecuteInterceptor used when initializing the HttpRequest.
Parameter | |
---|---|
Name | Description |
initializer |
com.google.api.client.http.HttpRequestInitializer the original initializer which will be executed before this initializer. |
Returns | |
---|---|
Type | Description |
com.google.api.client.http.HttpRequestInitializer |
the |
getTracer()
public Tracer getTracer()
Returns the tracing component of OpenCensus.
Returns | |
---|---|
Type | Description |
io.opencensus.trace.Tracer |
the tracing component of OpenCensus. |
isRecordEvents()
public boolean isRecordEvents()
Returns whether spans are stored locally.
Returns | |
---|---|
Type | Description |
boolean |
whether spans are stored locally. |