This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Sentry.DefaultEventFilter do | |
@behaviour Sentry.EventFilter | |
@moduledoc false | |
@ignored_exceptions [ | |
Phoenix.NotAcceptableError, | |
Phoenix.Router.NoRouteError, | |
Plug.Conn.InvalidQueryError, | |
Plug.Parsers.BadEncodingError, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :sentry, | |
filter: MyAppWeb.SentryEventFilter | |
# other Sentry configuration keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=CRASH REPORT==== 14-May-2019::10:00:59.621479 === | |
crasher: | |
initial call: erl_eval:'-expr/5-fun-3-'/0 | |
pid: <0.78.0> | |
registered_name: [] | |
exception error: pang | |
in function shell:apply_fun/3 (shell.erl, line 907) | |
ancestors: [<0.76.0>] | |
message_queue_len: 0 | |
messages: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo.get(User, id) | |
|> EctoAnon.run(Repo, cascade: true) | |
{:ok, | |
%User{ | |
email: "redacted", | |
firstname: "Emilie", | |
last_sign_in_at: ~U[2018-01-01 00:00:00Z], | |
lastname: "redacted", | |
favorite_quote: %Quote{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule User do | |
use Ecto.Schema | |
use EctoAnon.Schema | |
anon_schema [ | |
:lastname, | |
:email, | |
:followers, | |
:favorite_quote, | |
:quotes, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = Repo.get(User, id) | |
%User{name: "jane", age: 24, email: "[email protected]"} | |
EctoAnon.run(user, Repo) | |
{:ok, %User{name: "redacted", age: 24, email: "redacted"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule User do | |
use Ecto.Schema | |
use EctoAnon.Schema | |
anon_schema [ | |
:name, | |
] | |
schema "users" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :module_name, :atom, | |
host: System.get_env("MODULE_HOST", "localhost"), | |
port: String.to_integer(System.get_env("MODULE_PORT", "8126")), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Mix.Tasks.Tmp.BackfillGender do | |
use Mix.Task | |
import Ecto.Query | |
@shortdoc "Backfill gender with title data in users table" | |
def run(_) do | |
sql_query = ~S""" | |
UPDATE users SET | |
gender = mapping.gender | |
FROM (VALUES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule WttjApiWeb.Api.UserView do | |
use WttjApiWeb, :view | |
def render("user.json", %{user: user}) do | |
%{ | |
gender: user.gender, | |
title: user.title | |
} | |
end | |
end |
NewerOlder