Skip to content

Pass panics and errors to tracing #160

@m4tx

Description

@m4tx

We already handle errors and panics in the request handlers - they should never crash the application and should just display an error page instead. It would be nice to make more use of it - specifically, the errors and panics should be logged using the tracing crate, ideally with as much metadata as possible.

The main reason to do this is to allow us to integrate with tracing-opentelemetry, which will enable Cot users to monitor errors happening in their services.

The main entry point to error handling is https://github.com/cot-rs/cot/blob/master/cot/src/error_page.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions