-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[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
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ export function registerServerMetrics(registry: prometheusClient.Registry) { | |
registry.registerMetric(imageBuildsStartedTotal); | ||
registry.registerMetric(imageBuildsCompletedTotal); | ||
registry.registerMetric(spicedbClientLatency); | ||
registry.registerMetric(dashboardErrorBoundary); | ||
registry.registerMetric(jwtCookieIssued); | ||
registry.registerMetric(jobStartedTotal); | ||
registry.registerMetric(jobsCompletedTotal); | ||
|
@@ -264,15 +263,6 @@ export function observeSpicedbClientLatency(operation: string, outcome: Error | | |
); | ||
} | ||
|
||
export const dashboardErrorBoundary = new prometheusClient.Counter({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is already available in GCP if one search for the message |
||
name: "gitpod_dashboard_error_boundary_total", | ||
help: "Total number of errors caught by an error boundary in the dashboard", | ||
}); | ||
|
||
export function increaseDashboardErrorBoundaryCounter() { | ||
dashboardErrorBoundary.inc(); | ||
} | ||
|
||
export const jobStartedTotal = new prometheusClient.Counter({ | ||
name: "gitpod_server_jobs_started_total", | ||
help: "Total number of errors caught by an error boundary in the dashboard", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,6 @@ import { AttributionId } from "@gitpod/gitpod-protocol/lib/attribution"; | |
import { CostCenterJSON } from "@gitpod/gitpod-protocol/lib/usage"; | ||
import { createCookielessId, maskIp } from "../analytics"; | ||
import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server"; | ||
import { increaseDashboardErrorBoundaryCounter } from "../prometheus-metrics"; | ||
import { LinkedInService } from "../linkedin-service"; | ||
import { SnapshotService, WaitForSnapshotOptions } from "./snapshot-service"; | ||
import { IncrementalPrebuildsService } from "../prebuilds/incremental-prebuilds-service"; | ||
|
@@ -3464,14 +3463,12 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { | |
// | ||
//#endregion | ||
|
||
/** | ||
* TODO(ak) | ||
* @deprecated remove it after dashboard is deployed. It was replaced with error reporting in GCP. | ||
*/ | ||
async reportErrorBoundary(ctx: TraceContextWithSpan, url: string, message: string): Promise<void> { | ||
akosyakov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// 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), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was leaking sensitive data in some URLs |
||
userId: this.userID, | ||
}); | ||
increaseDashboardErrorBoundaryCounter(); | ||
// no-op | ||
} | ||
|
||
async getIDToken(): Promise<void> {} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.