public final class CensusStatsModule extends Object
StreamTracer that records stats to Census.
On the client-side, a factory is created for each call, because ClientCall starts earlier than the ClientStream, and in some cases may even not create a ClientStream at all. Therefore, it's the factory that reports the summary to Census.
On the server-side, there is only one ServerStream per each ServerCall, and ServerStream starts earlier than the ServerCall. Therefore, only one tracer is created per stream/call and it's the tracer that reports the summary to Census.
| Constructor and Description |
|---|
CensusStatsModule(io.opencensus.tags.Tagger tagger,
io.opencensus.tags.propagation.TagContextBinarySerializer tagCtxSerializer,
io.opencensus.stats.StatsRecorder statsRecorder,
com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier,
boolean propagateTags,
boolean recordStartedRpcs,
boolean recordFinishedRpcs,
boolean recordRealTimeMetrics)
Creates a
CensusStatsModule with the given OpenCensus implementation. |
public CensusStatsModule(io.opencensus.tags.Tagger tagger,
io.opencensus.tags.propagation.TagContextBinarySerializer tagCtxSerializer,
io.opencensus.stats.StatsRecorder statsRecorder,
com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier,
boolean propagateTags,
boolean recordStartedRpcs,
boolean recordFinishedRpcs,
boolean recordRealTimeMetrics)
CensusStatsModule with the given OpenCensus implementation.