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

Add winston formatting support for error causes #6576

Merged
merged 4 commits into from Nov 17, 2022

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Nov 15, 2022

Signed-off-by: Sebastian Malton sebastian@malton.name

With this change winston will now output error causes similar to the following:

warn:    ┏ [METRICS-ROUTE]: failed to get metrics for clusterId=bbac0abbd285a980101644eac4beef45: No Prometheus service found +6s
warn:    ┃ [ 1] Error: No Prometheus service found
warn:    ┃ [ 2]     at ContextHandler.getPrometheusService (/Users/sebastianmalton/repos/lens/static/build/main.js:31712:11)
warn:    ┃ [ 3]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
warn:    ┃ [ 4]     at async ContextHandler.getPrometheusDetails (/Users/sebastianmalton/repos/lens/static/build/main.js:31661:21)
warn:    ┃ [ 5]     at async /Users/sebastianmalton/repos/lens/static/build/main.js:39227:44
warn:    ┃ [ 6]     at async Object.route (/Users/sebastianmalton/repos/lens/static/build/main.js:38119:24)
warn:    ┃ [ 7]     at async Router.route (/Users/sebastianmalton/repos/lens/static/build/main.js:38377:5)
warn:    ┃ [ 8]     at async LensProxy.handleRequest (/Users/sebastianmalton/repos/lens/static/build/main.js:36560:5)
warn:    ┃ [ 9] Cause: Error: Failed to list services for PrometheusLens in namespace="lens-metrics": services "prometheus" not found
warn:    ┃ [10]     [
warn:    ┃ [11]       Error: Failed to list services for PrometheusLens in namespace="lens-metrics": services "prometheus" not found
warn:    ┃ [12]           at PrometheusLens.getNamespacedService (/Users/sebastianmalton/repos/lens/static/build/main.js:37519:13)
warn:    ┃ [13]           at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
warn:    ┃ [14]           at async Promise.allSettled (index 0)
warn:    ┃ [15]           at async ContextHandler.getPrometheusService (/Users/sebastianmalton/repos/lens/static/build/main.js:31697:31)
warn:    ┃ [16]           at async ContextHandler.getPrometheusDetails (/Users/sebastianmalton/repos/lens/static/build/main.js:31661:21)
warn:    ┃ [17]           at async /Users/sebastianmalton/repos/lens/static/build/main.js:39227:44
warn:    ┃ [18]           at async Object.route (/Users/sebastianmalton/repos/lens/static/build/main.js:38119:24)
warn:    ┃ [19]           at async Router.route (/Users/sebastianmalton/repos/lens/static/build/main.js:38377:5)
warn:    ┃ [20]           at async LensProxy.handleRequest (/Users/sebastianmalton/repos/lens/static/build/main.js:36560:5)
warn:    ┗ [21]     ]

Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 added the chore label Nov 15, 2022
@Nokel81 Nokel81 added this to the 6.2.0 milestone Nov 15, 2022
@Nokel81 Nokel81 requested a review from a team as a code owner November 15, 2022 14:42
@Nokel81 Nokel81 requested review from jansav and ixrock and removed request for a team November 15, 2022 14:42
- Finally make logger fully injectable
- Simplify startMainApplication to only have runMany(Sync) invocations
  to fix time of use bugs related to logger

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@imageschool
Copy link

@jansav @ixrock Really looking forward to having this merged!!

@Iku-turso Iku-turso merged commit 8dd1d1a into master Nov 17, 2022
@Iku-turso Iku-turso deleted the upgrade-console-formatter branch November 17, 2022 12:56
@Nokel81 Nokel81 mentioned this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logger
3 participants