-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: error reporting plugin (#1601)
* feat: error reporting plugin * chore: size limit updated * chore: size limit updated * chore: refactor onerror fn and minor changes * chore: review comment addressed * refactor: instead of bugsnag core pkg used only required part of event class * chore: code refactoring * chore: code refactoring * chore: review commit addressed * chore: review comment addressed * chore: modified isruddersdkerror fn logic to filter integration sdk errors * chore: fix plugin loading * chore: log message updated * chore: used template literal instead of string concatenation in rollup * fix: unit test cases * chore: unit test cases * chore: lock file modified * chore: more unit tests * chore: ignore coverage for third party code * chore: ignore coverage for third party code in sonar * chore: test cases * chore: ignore coverage for third party code in sonar * chore: remove reference * chore: revert formatting changes * chore: address review comments * chore: address review comments * chore: updated plugin signature for backward compatibility * chore: added bugsnag plugin for backward compatibility * chore: size limit updated * chore: review comment address * chore: update metrics service url * chore: address review comment * chore: address review comment * chore: address review comment --------- Co-authored-by: George Bardis <[email protected]>
- Loading branch information
Showing
41 changed files
with
1,789 additions
and
479 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const METRICS_PAYLOAD_VERSION = '1'; | ||
|
||
export { METRICS_PAYLOAD_VERSION }; |
This file contains 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 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 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 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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import type { Breadcrumb } from './ApplicationState'; | ||
|
||
export type MetricServicePayload = { | ||
version: string; | ||
message_id: string; | ||
source: { | ||
name: string; | ||
sdk_version: string; | ||
write_key: string; | ||
install_type: string; | ||
}; | ||
errors?: ErrorEventPayload; | ||
}; | ||
|
||
export type ErrorEventPayload = { | ||
notifier: { | ||
name: string; | ||
version: string; | ||
url: string; | ||
}; | ||
events: ErrorEventType[]; | ||
}; | ||
|
||
export type ErrorEventType = { | ||
payloadVersion: string; | ||
exceptions: Exception[]; | ||
severity: string; | ||
unhandled: boolean; | ||
severityReason: { type: string }; | ||
app: { | ||
version: string; | ||
releaseStage: string; | ||
}; | ||
device: { | ||
locale?: string; | ||
userAgent?: string; | ||
time?: Date; | ||
}; | ||
request: { | ||
url: string; | ||
clientIp: string; | ||
}; | ||
breadcrumbs: Breadcrumb[] | []; | ||
context: string; | ||
metaData: { | ||
[index: string]: any; | ||
}; | ||
user: { | ||
id: string; | ||
}; | ||
}; | ||
|
||
export type GeneratedEventType = { | ||
errors: Exception[]; | ||
}; | ||
|
||
export interface Exception { | ||
message: string; | ||
errorClass: string; | ||
type: string; | ||
stacktrace: Stackframe[]; | ||
} | ||
export interface Stackframe { | ||
file: string; | ||
method?: string; | ||
lineNumber?: number; | ||
columnNumber?: number; | ||
code?: Record<string, string>; | ||
inProject?: boolean; | ||
} |
This file contains 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 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
Oops, something went wrong.