Skip to content

observability #464

Merged
robfrank merged 3 commits into
mainfrom
feat/observability
Dec 3, 2025
Merged

observability #464
robfrank merged 3 commits into
mainfrom
feat/observability

Conversation

@robfrank
Copy link
Copy Markdown
Owner

@robfrank robfrank commented Dec 3, 2025

This pull request implements the planned improvements for Phase 3: Quality & Robustness, with a focus on backend observability and testing coverage. The most significant changes include adding Prometheus metrics and structured logging for backend observability, updating dependencies to support these features, and documenting implementation progress. Additionally, a new test verifies the metrics endpoint. The implementation plan and progress are clearly documented for ongoing and future work.

Backend Observability Enhancements:

  • Added Prometheus metrics endpoint (/metrics) and integrated Micrometer for JVM/system metrics collection in WebBuilder.java. This includes registering metrics plugins and exposing /metrics for Prometheus scraping. [1] [2]
  • Switched logging from SLF4J Simple to Logback for structured logging, and added a new logback.xml configuration for log formatting and log levels. [1] [2]

Testing Improvements:

  • Implemented a new integration test (ObservabilityTest.java) to verify that the /metrics endpoint returns Prometheus-formatted metrics.

Documentation Updates:

  • Added a comprehensive implementation plan for Phase 3 in .agent/workflows/phase3-implementation.md, detailing backend and frontend tasks, observability goals, and success criteria.
  • Created a progress report (PHASE3_PROGRESS.md) outlining completed backend tests, current coverage, ongoing validation and observability work, and next steps.
  • Updated ROADMAP.md to mark observability enhancements as completed.
  • Updated developer documentation to include instructions for accessing Prometheus metrics.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly advances the backend's quality and robustness by implementing key observability features and enhancing testing. It introduces Prometheus metrics for system monitoring and structured logging with Logback, alongside a new test to ensure metrics functionality. The changes also include comprehensive documentation updates detailing the Phase 3 implementation plan and progress.

Highlights

  • Backend Observability: Integrated Prometheus metrics via Micrometer for JVM and system monitoring, and switched to Logback for structured logging to enhance backend observability.
  • Testing Improvements: Introduced a new integration test (ObservabilityTest.java) to specifically validate the functionality and output of the new Prometheus /metrics endpoint.
  • Documentation Updates: Updated project documentation, including a detailed Phase 3 implementation plan, a progress report, an updated roadmap marking observability as complete, and developer instructions for accessing metrics.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Dec 3, 2025

🧪 CI Insights

Here's what we observed from your CI run for 2835e70.

🟢 All jobs passed!

But CI Insights is watching 👀

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant observability improvements by adding a Prometheus metrics endpoint and switching to Logback for logging. The implementation is mostly solid, and the new test for the metrics endpoint is a good addition. I have a few suggestions for improvement: there's a potential memory leak in how some metrics are registered which should be addressed. Additionally, the logging configuration currently produces plain text logs, not structured logs as intended, and I've provided a suggestion to fix this. Finally, I've recommended a small change to make the new observability test more specific and robust.

Comment thread src/main/java/it/robfrank/linklift/config/WebBuilder.java Outdated
Comment thread src/main/resources/logback.xml Outdated
Comment thread src/test/java/it/robfrank/linklift/adapter/in/web/ObservabilityTest.java Outdated
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Dec 3, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.85% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (af2bb20) 2452 1446 58.97%
Head commit (2835e70) 2469 (+17) 1477 (+31) 59.82% (+0.85%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#464) 17 17 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

- Add proper cleanup for JvmGcMetrics on shutdown to prevent memory leaks
- Implement true structured JSON logging with Logstash encoder
- Improve test assertion to verify specific metric presence (jvm_memory_used_bytes)
- Add logstash-logback-encoder dependency for JSON log output

Addresses review comments from PR #464

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robfrank robfrank merged commit 0695b98 into main Dec 3, 2025
8 of 9 checks passed
@robfrank robfrank deleted the feat/observability branch December 3, 2025 12:40
mergify Bot added a commit that referenced this pull request Mar 10, 2026
…ip ci]

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.12.0 to 4.0.0.
Release notes

*Sourced from [docker/setup-buildx-action's releases](https://github.com/docker/setup-buildx-action/releases).*

> v4.0.0
> ------
>
> * Node 24 as default runtime (requires [Actions Runner v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) or later) by [`@​crazy-max`](https://github.com/crazy-max) in [docker/setup-buildx-action#483](https://redirect.github.com/docker/setup-buildx-action/pull/483)
> * Remove deprecated inputs/outputs by [`@​crazy-max`](https://github.com/crazy-max) in [docker/setup-buildx-action#464](https://redirect.github.com/docker/setup-buildx-action/pull/464)
> * Switch to ESM and update config/test wiring by [`@​crazy-max`](https://github.com/crazy-max) in [docker/setup-buildx-action#481](https://redirect.github.com/docker/setup-buildx-action/pull/481)
> * Bump `@​actions/core` from 1.11.1 to 3.0.0 in [docker/setup-buildx-action#475](https://redirect.github.com/docker/setup-buildx-action/pull/475)
> * Bump `@​docker/actions-toolkit` from 0.63.0 to 0.79.0 in [docker/setup-buildx-action#482](https://redirect.github.com/docker/setup-buildx-action/pull/482) [docker/setup-buildx-action#485](https://redirect.github.com/docker/setup-buildx-action/pull/485)
> * Bump js-yaml from 4.1.0 to 4.1.1 in [docker/setup-buildx-action#452](https://redirect.github.com/docker/setup-buildx-action/pull/452)
> * Bump lodash from 4.17.21 to 4.17.23 in [docker/setup-buildx-action#472](https://redirect.github.com/docker/setup-buildx-action/pull/472)
> * Bump minimatch from 3.1.2 to 3.1.5 in [docker/setup-buildx-action#480](https://redirect.github.com/docker/setup-buildx-action/pull/480)
>
> **Full Changelog**: <docker/setup-buildx-action@v3.12.0...v4.0.0>


Commits

* [`4d04d5d`](docker/setup-buildx-action@4d04d5d) Merge pull request [#485](https://redirect.github.com/docker/setup-buildx-action/issues/485) from docker/dependabot/npm\_and\_yarn/docker/actions-to...
* [`cd74e05`](docker/setup-buildx-action@cd74e05) chore: update generated content
* [`eee38ec`](docker/setup-buildx-action@eee38ec) build(deps): bump `@​docker/actions-toolkit` from 0.77.0 to 0.79.0
* [`7a83f65`](docker/setup-buildx-action@7a83f65) Merge pull request [#484](https://redirect.github.com/docker/setup-buildx-action/issues/484) from docker/dependabot/github\_actions/docker/setup-qe...
* [`a5aa967`](docker/setup-buildx-action@a5aa967) Merge pull request [#464](https://redirect.github.com/docker/setup-buildx-action/issues/464) from crazy-max/rm-deprecated
* [`e73d53f`](docker/setup-buildx-action@e73d53f) build(deps): bump docker/setup-qemu-action from 3 to 4
* [`28a438e`](docker/setup-buildx-action@28a438e) Merge pull request [#483](https://redirect.github.com/docker/setup-buildx-action/issues/483) from crazy-max/node24
* [`034e9d3`](docker/setup-buildx-action@034e9d3) chore: update generated content
* [`b4664d8`](docker/setup-buildx-action@b4664d8) remove deprecated inputs/outputs
* [`a8257de`](docker/setup-buildx-action@a8257de) node 24 as default runtime
* Additional commits viewable in [compare view](docker/setup-buildx-action@8d2750c...4d04d5d)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=docker/setup-buildx-action&package-manager=github\_actions&previous-version=3.12.0&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

1 participant