Skip to content

Commit

Permalink
Remove TODOs about checking stats collection state.
Browse files Browse the repository at this point in the history
gRPC shouldn't use the state to determine whether to initialize the
CensusStatsModule, because the state can be changed at runtime.
  • Loading branch information
sebright committed Nov 2, 2017
1 parent adff468 commit c724318
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,6 @@ final List<ClientInterceptor> getEffectiveInterceptors() {
: Tags.getTagPropagationComponent().getBinarySerializer();
StatsRecorder statsRecorder =
this.statsRecorder != null ? this.statsRecorder : Stats.getStatsRecorder();
// // TODO: How do we check whether stats is enabled, now that the StatsRecorder is always
// // non-null? Uncommenting this line causes test failures.
// if (Stats.getState() == StatsCollectionState.ENABLED) {
CensusStatsModule censusStats =
new CensusStatsModule(
tagger,
Expand All @@ -379,7 +376,6 @@ final List<ClientInterceptor> getEffectiveInterceptors() {
// First interceptor runs last (see ClientInterceptors.intercept()), so that no
// other interceptor can override the tracer factory we set in CallOptions.
effectiveInterceptors.add(0, censusStats.getClientInterceptor());
// }
}
if (tracingEnabled) {
CensusTracingModule censusTracing =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ final List<ServerStreamTracer.Factory> getTracerFactories() {
: Tags.getTagPropagationComponent().getBinarySerializer();
StatsRecorder statsRecorder =
this.statsRecorder != null ? this.statsRecorder : Stats.getStatsRecorder();
// // TODO: How do we check whether stats is enabled, now that the StatsRecorder is always
// // non-null? Uncommenting this line causes test failures.
// if (Stats.getState() == StatsCollectionState.ENABLED) {
CensusStatsModule censusStats =
new CensusStatsModule(
tagger,
Expand All @@ -261,7 +258,6 @@ final List<ServerStreamTracer.Factory> getTracerFactories() {
true,
recordStats);
tracerFactories.add(censusStats.getServerTracerFactory());
// }
}
if (tracingEnabled) {
CensusTracingModule censusTracing =
Expand Down

0 comments on commit c724318

Please sign in to comment.