Hiding Third-Party Code
When using libraries or frameworks, you will often have large portions of well-tested third-party code unlikely to have caused an error. Rollbar will collapse stack frames from third-party code to keep the focus on your code.
Single Root To set this up, you must configure your SDK to send the server.root, or the prefix URL for all in-house stack frame filenames. Any code from outside the server.root directory will be collapsed by default when you load that item in the Rollbar UI.
For example, in a hypothetical stack trace with lines from the following files:
● /home/deploy/www/app/model.py
● /home/deploy/www/app/controller.py
● /home/deploy/www/vendor/webfmwk/eventloop.py
● /home/deploy/www/vendor/webfmwk/startup.py
● /home/deploy/www/app/main.py
and with server.root set to /home/deploy/www/app, the lines from the vendor directory would be collapsed together to allow you to focus on your code and not the unlikely possibility that webfmk has a bug.
Extra Roots Sometimes you'll have to split your code into multiple sibling modules adjacent to folders you do not want to be included as project code (vendor, models, controllers, for instance). In these cases, you can send additional application roots in the project_package_paths key. These paths should look identical to the server root (the beginning of a URL), and the key should be in an array containing any additional folders to be considered "in-project"
Please check out our Docs on Server.Root to learn more.
Updated 11 months ago