Skip to content
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

[QUICK-FIX] - Added an ID for console errors #1659

Closed
wants to merge 2 commits into from

Conversation

krazziekay
Copy link
Collaborator

@krazziekay krazziekay commented Oct 12, 2022

What's in this PR?

  • Added a UUID for console errors in logger.ts
  • Added a custom error handler for the errors caught by Express JS.
    • Added a UUID as traceId. The user only receives this traceId and from our end we can easily search the Splunk logs using this traceId

Why

  • For better readability in Splunk(and other logging tools maybe)

Whats Next?

  • Not much, just merge and go...

@krazziekay krazziekay requested a review from a team as a code owner October 12, 2022 01:00
@@ -110,6 +111,7 @@ interface LoggerOptions {
export const getLogger = (name: string, options: LoggerOptions = {}): Logger => {
return createLogger(merge<Logger.LoggerOptions, LoggerOptions>({
name,
id: newUUID(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not needed because we add one in frontend-middleware-logger, don't we?

@krazziekay
Copy link
Collaborator Author

Closing because I could not override the Express JS error handling. The app is probably using Probot's error handling, so leaving it as it is

@krazziekay krazziekay closed this Oct 12, 2022
@krazziekay krazziekay deleted the quick-fix-id-for-console-logger branch October 12, 2022 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants