Skip to content

Missing exceptions raised in LiveComponents #73

@numso

Description

@numso

I recently noticed a couple of exceptions in my app's logs that aren't showing up in ErrorTracker. I suspect it is because these exceptions originate from a LiveComponent.

The LiveView Telemetry documentation mentions that they also emit these telemetry events for components:

[:phoenix, :live_component, :update, :start]
[:phoenix, :live_component, :update, :exception]
[:phoenix, :live_component, :handle_event, :start]
[:phoenix, :live_component, :handle_event, :exception]

Looks like this project is missing those and only subscribes to [:phoenix, :live_view, *] events:

# https://hexdocs.pm/phoenix_live_view/telemetry.html
[:phoenix, :live_view, :mount, :start],
[:phoenix, :live_view, :mount, :exception],
[:phoenix, :live_view, :handle_params, :start],
[:phoenix, :live_view, :handle_params, :exception],
[:phoenix, :live_view, :handle_event, :start],
[:phoenix, :live_view, :handle_event, :exception],
[:phoenix, :live_view, :render, :exception]

I'm happy to attempt a PR if we want this change in the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions