-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DB connection details logging (#2274)
* feat: log some information on RDS token * feat: report for max_connections * feat: report for authentication_timeout * feat: log token hash
- Loading branch information
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
defmodule Report.AuthenticationTimeout do | ||
@moduledoc """ | ||
Report Postgres' configured authentication_timeout | ||
""" | ||
|
||
@behaviour Report | ||
|
||
@impl Report | ||
def run() do | ||
{:ok, %Postgrex.Result{rows: [[authentication_timeout]]}} = | ||
Ecto.Adapters.SQL.query(Skate.Repo, "SHOW authentication_timeout") | ||
|
||
{:ok, [%{max_connections: authentication_timeout}]} | ||
end | ||
|
||
@impl Report | ||
def short_name(), do: "authentication_timeout" | ||
|
||
@impl Report | ||
def description(), do: "Postgres authentication_timeout configuration" | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
defmodule Report.MaxConnections do | ||
@moduledoc """ | ||
Report Postgres' configured max_connections | ||
""" | ||
|
||
@behaviour Report | ||
|
||
@impl Report | ||
def run() do | ||
{:ok, %Postgrex.Result{rows: [[max_connections]]}} = | ||
Ecto.Adapters.SQL.query(Skate.Repo, "SHOW max_connections") | ||
|
||
{:ok, [%{max_connections: max_connections}]} | ||
end | ||
|
||
@impl Report | ||
def short_name(), do: "max_connections" | ||
|
||
@impl Report | ||
def description(), do: "Postgres max_connections configuration" | ||
end |
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
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