Skip to content

Conversation

mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Jun 27, 2017

closes #165

Gives you the option to only view stacktrace frames from your app.

Module.split/1 unfortunately does not work for Erlang modules, as it's only supposed to be called on Elixir modules (elixir-lang/elixir#5909). As we sometimes have Erlang modules appear in stacktraces, we need to handle it ourselves 😕

Example of viewing App Only when configuring List as one of the whitelisted modules:
image

image

@mitchellhenke mitchellhenke requested a review from jeregrine June 27, 2017 21:41
@@ -191,4 +199,23 @@ defmodule Sentry.Event do

defp arity_to_integer(arity) when is_list(arity), do: Enum.count(arity)
defp arity_to_integer(arity) when is_integer(arity), do: arity

defp is_in_app?(nil, _in_app_whitelist), do: false
defp is_in_app?(_, []), do: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this right? Shouldn't it default to true because we want to send everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the part that is difficult to explain/document for me.

It sends up the entire stacktrace regardless, but certain lines in it are marked as being part of the app or not. If no modules are configured as being "part of the app", then we default to false.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm also wondering if instead of doing all that work we could rely on filepath like ruby.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right but would it hide all of the lines? Should we default to nil in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the case that no lines are marked as "in_app", it just shows everything with no option to filter by "in_app".

File path is probably a no go, as it doesn't give us full path. Example:

{Poison.Encoder.Any, :encode, 2, [file: 'lib/poison/encoder.ex', line: 383]}
{Poison, :encode!, 2, [file: 'lib/poison.ex', line: 41]}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeregrine ping

@mitchellhenke mitchellhenke merged commit 5c1a28d into master Jun 29, 2017
@mitchellhenke mitchellhenke deleted the app-frames branch June 29, 2017 14:45
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.

Support In-App Frames
2 participants