Logging and monitoring on front end SPA application
Asked Answered
R

1

7

is there any logging and monitoring best practices for React SPA around? (library, the benefit etc.) I've been doing FE ~7years but shame, I don't have much experiences with it.

My experiences is that the incident that happens on Frontend app is very obvious and easy to track on the browser. So implementing logging or monitoring is not so useful as on Backend.

Rufous answered 30/7, 2020 at 7:52 Comment(0)
D
3

I think that utilising some external library would be your best bet.

First of all, implementing an Error Boundary to catch and handle all the errors in your react app would be the cleanest solution. After the boundary catches such an error, then depending on your needs you could handle each type of errors in a certain way.

There are plenty of external logging services that you could use to store and manage selected errors:

To name a few.

Doing answered 30/7, 2020 at 8:20 Comment(1)
Sentry is for error logging, not generic logging.Rysler

© 2022 - 2024 — McMap. All rights reserved.