@@ -362,27 +362,7 @@ defmodule Sentry.Event do
362362 end
363363 end
364364
365- @ doc """
366- Converts the given stacktrace to a list of Sentry stacktrace frames.
367-
368- ## Examples
369-
370- iex> stacktrace = [{URI, :default_port, [:https, 4443], [file: "uri.ex", line: 12]}]
371- iex> stacktrace_to_frames(stacktrace)
372- [
373- %Interfaces.Stacktrace.Frame{
374- module: URI,
375- function: "URI.default_port/2",
376- filename: "uri.ex",
377- lineno: 12,
378- in_app: false,
379- vars: %{"arg0" => ":https", "arg1" => "4443"}
380- }
381- ]
382-
383- """
384- @ spec stacktrace_to_frames ( Exception . stacktrace ( ) ) :: [ Interfaces.Stacktrace.Frame . t ( ) ]
385- def stacktrace_to_frames ( stacktrace ) when is_list ( stacktrace ) do
365+ defp stacktrace_to_frames ( stacktrace ) when is_list ( stacktrace ) do
386366 in_app_module_allow_list = Config . in_app_module_allow_list ( )
387367
388368 Enum . reduce ( stacktrace , [ ] , fn entry , acc ->
@@ -465,29 +445,13 @@ defmodule Sentry.Event do
465445 Exception . format_mfa ( m , f , arity_to_integer ( a ) )
466446 end
467447
468- @ doc ~S"""
469- Builds a map of *variables* and their values from the given stacktrace.
470-
471- For Sentry, typically the key in the map would be the name of the variable,
472- but we don't have that available, so we fall back to `arg<x>` (see examples).
473-
474- ## Examples
475-
476- iex> stacktrace = [{URI, :default_port, [:https, 4443], _location = []}]
477- iex> args_from_stacktrace(stacktrace)
478- %{"arg0" => ":https", "arg1" => "4443"}
479-
480- """
481- @ spec args_from_stacktrace ( Exception . stacktrace ( ) ) :: % { optional ( String . t ( ) ) => String . t ( ) }
482- def args_from_stacktrace ( stacktrace )
483-
484- def args_from_stacktrace ( [ { _mod , _fun , args , _location } | _rest ] ) when is_list ( args ) ,
448+ defp args_from_stacktrace ( [ { _mod , _fun , args , _location } | _rest ] ) when is_list ( args ) ,
485449 do: stacktrace_args_to_vars ( args )
486450
487- def args_from_stacktrace ( [ { _fun , args , _location } | _rest ] ) when is_list ( args ) ,
451+ defp args_from_stacktrace ( [ { _fun , args , _location } | _rest ] ) when is_list ( args ) ,
488452 do: stacktrace_args_to_vars ( args )
489453
490- def args_from_stacktrace ( [ _other | _rest ] ) , do: % { }
454+ defp args_from_stacktrace ( [ _other | _rest ] ) , do: % { }
491455
492456 defp stacktrace_args_to_vars ( args ) do
493457 for { arg , index } <- Enum . with_index ( args ) , into: % { } do
0 commit comments