How create global filter

I have installations of different versions of my software and I want to drop everything from old versions: don’t even collect it.

Cannot understand where should I put custom code that filters incoming data.

This may help you: Inbound Filters | Sentry Documentation

The ideal way is to do this from the SDK itself but obviously, since you cannot control the old versions of your app, you should be using “Inbound filtering”.