Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a stackFrameFilter argument to SentryClient's capture #30

Merged
merged 3 commits into from Dec 10, 2018

Conversation

tom95
Copy link
Contributor

@tom95 tom95 commented Nov 12, 2018

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.

This allows filtering sensitive frames on the client or applying
custom truncation logic.
@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@tom95
Copy link
Contributor Author

tom95 commented Nov 12, 2018

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 :(

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLA bot seems happy, but dartfmt failed. Could you please format edited files using dartfmt? LGTM with a small comment.

@@ -4,6 +4,10 @@

import 'package:stack_trace/stack_trace.dart';

/// Used to filter or modify stack frames before sending stack trace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention that the stack trace format given to the function uses the Senty.io format.

@googlebot
Copy link

CLAs look good, thanks!

@tom95
Copy link
Contributor Author

tom95 commented Dec 10, 2018

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 :) )

@yjbanov yjbanov merged commit 96be842 into getsentry:master Dec 10, 2018
@yjbanov
Copy link
Contributor

yjbanov commented Dec 10, 2018

Thank you for the contribution and for your patience! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants