getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

exclude_paths is not used without include_paths #1288

Open fabiopedrosa opened 6 years ago

fabiopedrosa commented 6 years ago

Just noticed exclude_paths is only used when there are a non-empty include_paths. Could that be fixed?

if self.include_paths:
            for frame in self._iter_frames(data):
                if frame.get('in_app') is not None:
                    continue

                path = frame.get('module')
                if not path:
                    continue

                if path.startswith('raven.'):
                    frame['in_app'] = False
                else:
                    print "checking", path
                    frame['in_app'] = (
                        any(path.startswith(x) for x in self.include_paths) and
                        not any(path.startswith(x) for x in self.exclude_paths)
                    )
GaussDing commented 5 years ago

yeah, i think this not friendly, i want to exclude but not related include_paths