Add a stackFrameFilter argument to SentryClient's capture - #30
Conversation
This allows filtering sensitive frames on the client or applying custom truncation logic.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
Hm. Any guidance on how to tackle the CLA bot's disapproval? It does not appear to be possible to inspect CLAs for companies via the link and the troubleshooting section on that topic contains mostly broken links :( |
yjbanov
left a comment
There was a problem hiding this comment.
The CLA bot seems happy, but dartfmt failed. Could you please format edited files using dartfmt? LGTM with a small comment.
|
|
||
| import 'package:stack_trace/stack_trace.dart'; | ||
|
|
||
| /// Used to filter or modify stack frames before sending stack trace. |
There was a problem hiding this comment.
Let's mention that the stack trace format given to the function uses the Senty.io format.
|
CLAs look good, thanks! |
|
Thank you for the review! I added the comment and let dartfmt do its thing. (I chose to keep this PR over the other because this one contained actual review comments :) ) |
|
Thank you for the contribution and for your patience! 👍 |
Attempt no 2, description copied:
This change allows filtering sensitive frames on the client or applying custom truncation logic.
I created this in reaction to this discussion: https://forum.sentry.io/t/issue-in-flutter-project-with-stackframe-display-limit-set-to-250/5014/2
Instead of adding complex truncation options that will likely depend on the frameworks you use anyways, I opted to provide a more general callback that could also be used for things like filtering specific frames. In the case of above discussion, we'd simply cut the list passed to us to only send the topmost 250 items.