-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
What? Why?
I would like to define a sample rate for the request logger on a per RPC basis. Currently I have a service which has high volume of traffic and my options are to either disable the logger (using ignore_methods) for that RPC or to keep logging the request at high volume.
This could potentially be set up like:
c.interceptors.use(
Gruf::Interceptors::Instrumentation::RequestLogging::Interceptor,
formatter: :logstash,
...
sampled_methods: {
'rpc.dummy.high.volume.request' => 0.1
}
)EDIT:
Another interesting idea would be to attach sample rates to the status of the RPC, as an example say I only want to log 1% of successes and 100% of failed (Grpc::BadStatus) requests.
junedkazi