Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Support sample rate for request logger #69

Open
pedelman opened this issue Feb 18, 2019 · 1 comment
Open

Idea: Support sample rate for request logger #69

pedelman opened this issue Feb 18, 2019 · 1 comment
Assignees
Labels

Comments

@pedelman
Copy link
Contributor

pedelman commented Feb 18, 2019

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.

@pedelman
Copy link
Contributor Author

cc @mattolson @splittingred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants