Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log mailer errors #3336

Merged
merged 3 commits into from
Sep 21, 2023
Merged

log mailer errors #3336

merged 3 commits into from
Sep 21, 2023

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Sep 9, 2023

Changes

Log mailer errors both to console and Sentry. The way these errors are sent to Sentry should stay the same ,but I'll need to try it out on my instance first. (done, and they are still fingerprinted under the same issue)

Before

Screenshot 2023-09-09 at 10 55 57

After

Screenshot 2023-09-09 at 10 56 11

REF: #3335 (reply in thread)

There are more places in the codebase where the logs are suppressed and only Sentry receives the error; if this PR works out well, I'll update those other places as well.

Tests

  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@bundlemon
Copy link

bundlemon bot commented Sep 9, 2023

BundleMon

Unchanged files (7)
Status Path Size Limits
static/js/dashboard.js
318.6KB -
static/js/app.js
40.11KB -
static/css/app.css
14.37KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.08KB -
tracker/js/plausible.js
742B -
static/js/applyTheme.js
314B -

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@ruslandoga ruslandoga marked this pull request as ready for review September 9, 2023 03:48
@ruslandoga ruslandoga requested a review from a team September 9, 2023 03:49
@@ -124,7 +124,7 @@
"ref_inspector": {:hex, :ref_inspector, "1.3.1", "bb0489a4c4299dcd633f2b7a60c41a01f5590789d0b28225a60be484e1fbe777", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:yamerl, "~> 0.7", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "3172eb1b08e5c69966f796e3fe0e691257546fa143a5eb0ecc18a6e39b233854"},
"referrer_blocklist": {:git, "https://github.com/plausible/referrer-blocklist.git", "d6f52c225cccb4f04b80e3a5d588868ec234139d", []},
"rustler_precompiled": {:hex, :rustler_precompiled, "0.6.2", "d2218ba08a43fa331957f30481d00b666664d7e3861431b02bd3f4f30eec8e5b", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "b9048eaed8d7d14a53f758c91865cc616608a438d2595f621f6a4b32a5511709"},
"sentry": {:hex, :sentry, "8.0.6", "c8de1bf0523bc120ec37d596c55260901029ecb0994e7075b0973328779ceef7", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "051a2d0472162f3137787c7c9d6e6e4ef239de9329c8c45b1f1bf1e9379e1883"},
"sentry": {:hex, :sentry, "8.1.0", "8d235b62fce5f8e067ea1644e30939405b71a5e1599d9529ff82899d11d03f2b", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "f9fc7641ef61e885510f5e5963c2948b9de1de597c63f781e9d3d6c9c8681ab4"},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ukutaht ukutaht merged commit c3910ae into master Sep 21, 2023
6 checks passed
@ukutaht ukutaht deleted the log-mailer-errors branch September 21, 2023 10:06
@aerosol
Copy link
Member

aerosol commented Sep 21, 2023

@ruslandoga I just got this locally, do you think it's related?

[error] Failure while translating Erlang's logger event
** (UndefinedFunctionError) function Plug.Cowboy.Translator.translate/4 is undefined (module Plug.Cowboy.Translator is not available)
    (plug_cowboy 2.6.1) Plug.Cowboy.Translator.translate(:warn, :error, :format, {'[locus] [~ts] database failed to load (~p): ~p~n', [:geolocation, :filesystem, :not_found]})
    (logger 1.14.3) lib/logger/handler.ex:227: Logger.Handler.do_translate/6
    (logger 1.14.3) lib/logger/handler.ex:126: Logger.Handler.do_log/4
    (logger 1.14.3) lib/logger/handler.ex:84: Logger.Handler.log/2
    (kernel 8.5.3) logger_backend.erl:51: :logger_backend.call_handlers/3
    (stdlib 4.2) lists.erl:1442: :lists.foreach_1/2
    (locus 2.3.6) /home/hq1/workspaces/plausible/analytics/deps/locus/src/locus_database.erl:406: :locus_database.handle_loader_msg/2
    (stdlib 4.2) gen_server.erl:1123: :gen_server.try_dispatch/4
    (stdlib 4.2) gen_server.erl:1200: :gen_server.handle_msg/6
    (stdlib 4.2) proc_lib.erl:250: :proc_lib.wake_up/3

@ruslandoga
Copy link
Contributor Author

It could be :)

But from the location where it happens (plug) and the error message (locus) it doesn't seem to be directly related.

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.

None yet

3 participants