Skip to content

No logs resulting from mix release RPC #466

@SophisticaSean

Description

@SophisticaSean

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?
Sentry 8.0

Steps to Reproduce

  1. Configure sentry logger on an elixir Release
  2. Use Elixir release RPC to send an RPC request that'll result in an error.
  3. Observe the Sentry logger will not have reported the error to sentry.

Expected Result

An RPC to a running elixir node should result in a sentry error if applicable.

Actual Result

Due to this line: https://github.com/getsentry/sentry-elixir/blob/master/lib/sentry/logger_backend.ex#L71 The logger is not the group leader and thus does not send a log when there's an error.

Same bug as in LoggerJSON: Nebo15/logger_json#65

This bug comes from a bad implementation of Elixir's logger a very long time ago. When mix releases came out Elixir changed this so you'd actually get logs from RPCs but most libs that copied that code didn't change the offending function.

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