Skip to content

Add a stackFrameFilter argument to SentryClient's capture - #30

Merged
yjbanov merged 3 commits into
getsentry:masterfrom
tom95:feature/stack-frame-filter2
Dec 10, 2018
Merged

Add a stackFrameFilter argument to SentryClient's capture#30
yjbanov merged 3 commits into
getsentry:masterfrom
tom95:feature/stack-frame-filter2

Conversation

@tom95

@tom95 tom95 commented Nov 12, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

tom95 commented Nov 12, 2018

Copy link
Copy Markdown
Contributor Author

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 yjbanov left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/src/stack_trace.dart Outdated

import 'package:stack_trace/stack_trace.dart';

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

Copy link
Copy Markdown
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
Copy Markdown

CLAs look good, thanks!

@tom95

tom95 commented Dec 10, 2018

Copy link
Copy Markdown
Contributor Author

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

yjbanov commented Dec 10, 2018

Copy link
Copy Markdown
Contributor

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.

3 participants