census: add interceptor APIs for configuring census features with custom settings on client side #7153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provides a
ClientInterceptor
ingrpc-census
that allow users to turn on/off census stats/tracing and customize stats collection settings.The idea to disable the default census features in grpc-core is to pass a CallOption that turns the default census interceptors to NOOP, when the custom census interceptor is applied.
AbstractManagedChannelImplBuilder
to allow inserting an interceptor for testing purposes that will always be the closest to the network (aka, inserted to the front of default census interceptors). This allows tests to capture the effective set of CallOptions passed to the call. This API is only exposed inInProcessChannelBuilder
, and it is made public viaInternalInProcess
accessor.module
to check the settings ofrecordStartedRpcs
,recordFinishedRpcs
andrecordRealTimeMetrics
, instead of firing up RPCs to verify its behaviors. But it turns out to be enough, asCensusModulesTest
has a comprehensive set of test cases that verified the behaviors.See discussions in #5624.