Skip to content

[dashboard] unify error reporting #18726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 18, 2023
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Sep 15, 2023

Description

In #18691 we moved to dashboard to use metrics endpoint used already by other clients to collect client observability metrics and errors. This PR is a follow up to clean up other places where custom code was used.

Summary generated by Copilot

🤖 Generated by Copilot at a59a371

Improved error reporting for dashboard error boundaries and deprecated server-side method. Refactored reportError function and fixed a bug in metrics.ts.

Related Issue(s)

Fixes #

How to test

  • Run new Promise((_,reject) => reject(new Error("foobar"))) in devtool
  • And check out that reportError is called with all necessary info including user id from network tab.

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

move error boundary to general error reporting endpoint as well
@akosyakov akosyakov force-pushed the ak/dashboard_unify_error_reporting branch from 3e21102 to 773444c Compare September 15, 2023 12:16
@roboquat roboquat added size/M and removed size/S labels Sep 15, 2023
// Cap message and url length so the entries aren't of unbounded length
log.warn("dashboard error boundary", {
message: (message || "").substring(0, 200),
url: (url || "").substring(0, 200),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was leaking sensitive data in some URLs

@@ -264,15 +263,6 @@ export function observeSpicedbClientLatency(operation: string, outcome: Error |
);
}

export const dashboardErrorBoundary = new prometheusClient.Counter({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is already available in GCP if one search for the message

@roboquat roboquat added size/L and removed size/M labels Sep 15, 2023
@geropl
Copy link
Member

geropl commented Sep 18, 2023

Code LGTM, waiting for a preview env...

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, tested and works ✔️

@akosyakov
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 3cf0cf2 into main Sep 18, 2023
@roboquat roboquat deleted the ak/dashboard_unify_error_reporting branch September 18, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants