Explore Profiles is a native Grafana application designed to integrate seamlessly with Pyroscope, the open-source continuous profiling platform, providing a smooth, query-less experience for browsing and analyzing profiling data.
This PR is an attempt to improve how we track errors, in order to benefit from great frontend observability dashboards and fast response in case of incidents!
📖 Summary of the changes
Besides adding an ErrorBoundary with a new error page:
This PR introduces several changes:
A new Logger class, which encapsulates calls to Faro and/or console.xyz()
All existing console.xyz() calls have been changed to calls to logger.xyz()
Enforcing logger usage: ESLint will fail if any console.xyz() calls are present in the code
When calling displayError(), the error is automatically logged
When passing an error as prop to <InlineBanner />, it's automatically logged
Refactor: <InlineBanner /> now only accepts a single error as prop (no more arrays)
🧪 How to test?
The build should pass: some unit tests have been added, some refactored.
✨ Description
Related issue(s): resolves https://github.com/grafana/explore-profiles/issues/263
This PR is an attempt to improve how we track errors, in order to benefit from great frontend observability dashboards and fast response in case of incidents!
📖 Summary of the changes
Besides adding an
ErrorBoundary
with a new error page:This PR introduces several changes:
Logger
class, which encapsulates calls to Faro and/orconsole.xyz()
console.xyz()
calls have been changed to calls tologger.xyz()
console.xyz()
calls are present in the codedisplayError()
, the error is automatically loggederror
as prop to<InlineBanner />
, it's automatically logged<InlineBanner />
now only accepts a single error as prop (no more arrays)🧪 How to test?
The build should pass: some unit tests have been added, some refactored.
Manually: