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

Filter urls

Open dgastudio opened this issue 3 years ago • 2 comments

Hello my backend is using multiple url workspaces api/v1/* api/v2/* system/* ...etc

i need to apply trebble to only some of them. It's possible to provide a wildcard mask to filter processed endpoints?

dgastudio avatar Mar 04 '22 13:03 dgastudio

Hey man, thank you for posting - i think it should be possible. I'm going to CC our SDK dev @zoka123 and we'll take a peek 😀

cindreta avatar Mar 04 '22 14:03 cindreta

This would be a nice enhancement. We could implement some service that would allow you to make decisions whether the Treblle logic should kick in or not, based on whatever logic you want it to be (route used, request context, etc), not only URL patterns.

Until the feature is ready, you could achieve the same by selectively instantiating the Treblle instance depending on conditions you care about.

zoka123 avatar Mar 04 '22 16:03 zoka123