You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For high-traffic services, it may be unfeasible to add tracing for all requests due to the large volume.
It is a common practice to sample traces for specific requests (e.g. by user id) instead of random sampling.
Currently, BraveService already provides a way to do this via either 1) Tracing.newBuilder().sampler(...) or 2) HttpTracing.newBuilder(...).serverSampler().
However, sometimes users would like to sample based on a parameter parsed by rpc requests.
Because BraveService determines whether a trace should be sampled before the request is parsed into a rpc request, it is difficult for users to sample based on RPC requests.
Proposal
I propose that a BraveRpcService is introduced. By doing so, users may sample traces based on RPC parameters more easily.
By doing so, users will be able to sample traces based on ServiceRequestContext#rpcRequest
One caveat is that BraveRpcService sampler won't have an effect if a BraveService is already in the decorator chain and was processed.
The additional span containing RPC specific information would still probably be useful though.
The text was updated successfully, but these errors were encountered:
Motivation
For high-traffic services, it may be unfeasible to add tracing for all requests due to the large volume.
It is a common practice to sample traces for specific requests (e.g. by user id) instead of random sampling.
Currently,
BraveService
already provides a way to do this via either 1)Tracing.newBuilder().sampler(...)
or 2)HttpTracing.newBuilder(...).serverSampler()
.However, sometimes users would like to sample based on a parameter parsed by rpc requests.
Because
BraveService
determines whether a trace should be sampled before the request is parsed into a rpc request, it is difficult for users to sample based on RPC requests.Proposal
I propose that a
BraveRpcService
is introduced. By doing so, users may sample traces based on RPC parameters more easily.By doing so, users will be able to sample traces based on
ServiceRequestContext#rpcRequest
i.e.
One caveat is that
BraveRpcService
sampler won't have an effect if aBraveService
is already in the decorator chain and was processed.The additional span containing RPC specific information would still probably be useful though.
The text was updated successfully, but these errors were encountered: