opencensus-php icon indicating copy to clipboard operation
opencensus-php copied to clipboard

Add a sampler for path based blacklist?

Open tmatsuo opened this issue 6 years ago • 5 comments

I'm thinking to add something like PathBlacklistWrapper or sth. It will accept SamplerInterface, if the request path matches the blacklist returns false, otherwise defer it to the inner sampler.

tmatsuo avatar Mar 22 '18 18:03 tmatsuo

What about something accepting only certain paths or avoiding certain paths? That would provide more functionality under the same principle: https://github.com/jcchavezs/zipkin-symfony/blob/master/src/ZipkinBundle/Samplers/PathSampler.php

-- José Carlos Chávez Spain: (+34) 672921339 Perú: (+51) 708-5422 Anexo 918

https://github.com/jcchavezs

jcchavezs avatar Mar 22 '18 18:03 jcchavezs

@jcchavezs Sounds good to have both include and exclude (or whitelist and blacklist), but it's still valuable to be able to have the inner sampler.

tmatsuo avatar Mar 22 '18 19:03 tmatsuo

Alternatively, we could build a generic multi-sampler that could be configured with multiple samplers in order. This would allow each individual sampler to only worry about its use case and not about chaining to other samplers.

Similarly, we could build a multi-reporter that could report to multiple backends.

chingor13 avatar Mar 22 '18 19:03 chingor13

@chingor13 Yeah that's more generic and I like it

tmatsuo avatar Mar 22 '18 19:03 tmatsuo

So we still want the path blacklist?

jcchavezs avatar Mar 29 '18 09:03 jcchavezs