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

Duplicate errors between Sentry.LoggerBackend and Sentry.Plug #374

Closed
hfjallemark opened this issue Nov 24, 2019 · 0 comments · Fixed by #377
Closed

Duplicate errors between Sentry.LoggerBackend and Sentry.Plug #374

hfjallemark opened this issue Nov 24, 2019 · 0 comments · Fixed by #377

Comments

@hfjallemark
Copy link

Environment

  • Elixir version (elixir -v): 1.9.1
  • Erlang/OTP version (erl): 22
  • Sentry version (mix deps): 7.2.0
  • Operating system: macOS Catalina

Description

When adding the Sentry.LoggerBackend I am receiving duplicate events for request errors. Inspecting the logger backend code:

match?({^module, ^function, ^arity}, {Phoenix.Endpoint.Cowboy2Handler, :init, 2})

it seems it is looking for {Phoenix.Endpoint.Cowboy2Handler, :init, 2} but when my error occurs the stack trace contains {Phoenix.Endpoint.Cowboy2Handler, :init, 4} (arity 4 instead of 2).

Expected Behavior

Sentry should only log the Plug error that contains all the request meta data.

Actual Behavior

Sentry reports two errors, one with the request meta data and one without.

Steps to Reproduce

Configure both the Sentry plug and LoggerBackend and then throw an error in a controller action.

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 a pull request may close this issue.

1 participant