Skip to content

More formatting issues in Sentry.LoggerHandler #847

@whatyouhide

Description

@whatyouhide

We're seeing the same thing in trying to go from 8.x -> 10.x.

Here's our logger config now with 10.8.1:

   :logger.add_handler(:sentry_handler, Sentry.LoggerHandler, %{
      config: %{metadata: [:file, :line]}
    })

Here's a sample:

%{label: {:supervisor, :child_terminated}, report: [supervisor: {#PID<0.9613.0>, Supervisor.Default}, errorContext: :child_terminated, reason: {%RuntimeError{message: "Pubsub not configured!\n\nSubscriptions require a configured pubsub module.\n"}, [{Absinthe.Phase.Subscription.SubscribeSelf, :ensure_pubsub!, 1, [file: 'lib/absinthe/phase/subscription/subscribe_self.ex', line: 109, error_info: %{module: Exception}]}, {Absinthe.Phase.Subscription.SubscribeSelf, :do_subscription, 3, [file: 'lib/absinthe/phase/subscription/subscribe_self.ex', line: 20]}, {Absinthe.Pipeline, :run_phase, 3, [file: 'lib/absinthe/pipeline.ex', line: 370]}, {Absinthe.Phoenix.Channel, :run, 4, [file: 'lib/absinthe/phoenix/channel.ex', line: 123]}, {Absinthe.Phoenix.Channel, :run_doc, 4, [file: 'lib/absinthe/phoenix/channel.ex', line: 91]}, {Absinthe.Phoenix.Channel, :handle_in, 3, [file: 'lib/absinthe/phoenix/channel.ex', line: 57]}, {Phoenix.Channel.Server, :handle_info, 2, [file: 'lib/phoenix/channel/server.ex', line: 322]}, {:gen_server, :try_handle_info, 3, [file: 'gen_server.erl', line: 1095]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1183]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 241]}]}, offender: [pid: #PID<0.96241.0>, id: :undefined, mfargs: {Absinthe.Phoenix.Channel, :start_link, :undefined}, restart_type: :temporary, shutdown: 5000, child_type: :worker]]}
Image

Previously, with 8.x, it was purdy. 😢

Here was our logger config:

    Logger.add_backend(Sentry.LoggerBackend)
Image

Originally posted by @mhsdef in #685

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions