Skip to content

How to send logs in React-router app #68

Description

@anuar12

I have a product based on react-router framework in SPA mode (no SSR). I didn't find a way to send all the console.logs and exceptions from the frontend to logfire.
Is there a way to instrument them automatically?
the @opentelemetry/auto-instrumentations-web doesn't do it by default.
I guess I can capture errors with

window.addEventListener("error", (event) => {
    logfire.error(error)
})

but what about all the logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions