Skip to content

feat: structured error logging and widget wiring for health score coverage - #2173

Merged
gaspergrom merged 2 commits into
release/IN-1276-health-score-coveragefrom
feat/IN-1276-wire-widgets-and-structured-logging
Sep 9, 2026
Merged

feat: structured error logging and widget wiring for health score coverage#2173
gaspergrom merged 2 commits into
release/IN-1276-health-score-coveragefrom
feat/IN-1276-wire-widgets-and-structured-logging

Conversation

@gaspergrom

@gaspergrom gaspergrom commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace unstructured console.error calls in the 9 health-score-coverage API routes with a JSON-structured logError helper (frontend/server/utils/log.ts), addressing review feedback that these logs weren't parseable by Datadog.
  • Wire all 8 widget components into health-score-coverage-report.vue per the layout in attachments/IN-1276/implementation-plan.md section 5 — each widget is self-contained (no props, own data fetching) so this is an import + template placement change only.

Base branch is release/IN-1276-health-score-coverage (IN-1276 epic release branch), not main. Merge into the release branch once approved; do not merge into main directly.

Test plan

  • pnpm lint:fix clean (no new warnings/errors)
  • pnpm tsc-check clean
  • pnpm test — 285/285 passing
  • Manual QA of the assembled report view at /report/health-score-coverage
  • release/IN-1276-health-score-coverage - ⚠️ No PR associated with branch
    • feat: structured error logging and widget wiring for health score coverage 👈

…erage IN-1276

Replace unstructured console.error calls in health-score-coverage API
routes with a JSON-structured logError helper, and wire all 8 widget
components into the report view template per the implementation plan
layout.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI balanced review requested due to automatic review settings September 9, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds structured error logging and assembles the health-score coverage report widgets.

Changes:

  • Adds a shared JSON error logger across nine report APIs.
  • Integrates all eight coverage widgets into the report layout.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/server/utils/log.ts Adds structured error logging.
signal-scores.get.ts Uses structured logging.
signal-availability.get.ts Uses structured logging.
signal-availability-lf.get.ts Uses structured logging.
lifecycle.get.ts Uses structured logging.
glance.get.ts Uses structured logging.
github-security.get.ts Uses structured logging.
category-maximum.get.ts Uses structured logging.
category-coverage.get.ts Uses structured logging.
bands.get.ts Uses structured logging.
health-score-coverage-report.vue Adds the eight report widgets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +9 to +18
console.error(
JSON.stringify({
scope,
message,
error:
error instanceof Error
? { name: error.name, message: error.message, stack: error.stack }
: error,
}),
);
@gaspergrom
gaspergrom requested a review from epipav September 9, 2026 14:06
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI review requested due to automatic review settings September 9, 2026 16:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

frontend/server/utils/log.ts:10

  • error is unknown, and this serialization throws for values such as BigInt or circular objects. Every updated route invokes the helper before its status-aware rethrow/createError, so a logging failure replaces the intended HTTP response with a new TypeError. Catch serialization failures and emit a controlled JSON fallback; regression tests for circular and BigInt values would protect this shared helper.
    JSON.stringify({

Comment on lines +87 to +89
onServerPrefetch(async () => {
await suspense();
});
@gaspergrom
gaspergrom merged commit 3008f64 into release/IN-1276-health-score-coverage Sep 9, 2026
6 checks passed
@gaspergrom
gaspergrom deleted the feat/IN-1276-wire-widgets-and-structured-logging branch September 9, 2026 18:01
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.

3 participants