Skip to content

Sentry not capturing crashes inside Task.start function #434

@tanweerdev

Description

@tanweerdev

Environment

  • Elixir version (elixir -v):
    Elixir 1.10.2 (compiled with Erlang/OTP 21)
  • Erlang/OTP version (erl):
    Erlang/OTP 21
  • Sentry version (mix deps):
    8.0.2
  • Operating system:
    Erlang/OTP 21
  • Is this an umbrella application?:
    yes
  • Release type (Distillery, mix release, Mix, etc.):
    iex -S mix phx.server

Description

I am using sentry version 8.0.2 and its reporting errors perfectly for normal cases. But for the functions which I execute via Task.start it wont report errors. inside my phoenix endpoint file I have

use Sentry.PlugCapture ... plug Sentry.PlugContext 

in my config I also have

config :logger, + backends: [:console, Sentry.LoggerBackend] 

Configuration seems correct but I am not able to capture events. Maybe I am missing something... Any help or guidance is welcome. Thanks

Expected Behavior

Sentry Should Report Error

Actual Behavior

Nothing happens. I although see crash on my console

Steps to Reproduce

  • Create an umbrella app
  • Configure sentry in phoenix app
  • Create a sample controller
  • From controller function, call a function inside Task.start which should crash
  • You wont get crash reported by sentry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions