Add custom metrics to micrometer#474
Draft
qligier wants to merge 3 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds custom metrics to Micrometer for monitoring Matchbox server operations. It introduces a new metrics infrastructure to track validation and transformation operations, along with a refactoring of the engine caching mechanism.
Changes:
- Introduces MatchboxMetrics class to expose validation count, validation duration, and transformation count metrics via Micrometer
- Refactors EngineSessionCache into MatchboxEngineCache with improved separation of permanent vs. transient engines
- Adds count() methods to ImplementationGuideProvider implementations to expose the number of installed IGs as a metric
- Updates CliContext to provide a sessionId() method for consistent session identification
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| matchbox-server/src/main/java/ch/ahdis/matchbox/util/metrics/MatchboxMetrics.java | New class that defines custom Micrometer metrics for validations and transformations |
| matchbox-server/src/main/java/ch/ahdis/matchbox/config/MatchboxMetricsConfig.java | New Spring configuration that registers metrics beans and exposes engine/IG counts |
| matchbox-server/src/main/java/ch/ahdis/matchbox/util/MatchboxEngineCache.java | New cache implementation replacing EngineSessionCache with better separation of permanent and transient engines |
| matchbox-server/src/main/java/ch/ahdis/matchbox/util/EngineSessionCache.java | Deleted file, replaced by MatchboxEngineCache |
| matchbox-server/src/main/java/ch/ahdis/matchbox/validation/ValidationProvider.java | Updated to collect validation metrics using MatchboxMetrics |
| matchbox-server/src/main/java/ch/ahdis/matchbox/validation/gazelle/GazelleValidationWs.java | Updated to collect validation metrics via constructor-injected MatchboxMetrics |
| matchbox-server/src/main/java/ch/ahdis/matchbox/mappinglanguage/StructureMapTransformProvider.java | Updated to collect transformation metrics using MatchboxMetrics |
| matchbox-server/src/main/java/ch/ahdis/matchbox/util/MatchboxEngineSupport.java | Refactored to use MatchboxEngineCache instead of EngineSessionCache, improving session ID handling |
| matchbox-server/src/main/java/ch/ahdis/matchbox/CliContext.java | Added sessionId() method to encapsulate session ID generation logic |
| matchbox-server/src/main/java/ch/ahdis/matchbox/packages/MatchboxImplementationGuideProvider.java | Added count() method interface for tracking installed IGs |
| matchbox-server/src/main/java/ch/ahdis/matchbox/packages/ImplementationGuideProviderR5.java | Implemented count() method to expose IG count metric |
| matchbox-server/src/main/java/ch/ahdis/matchbox/packages/ImplementationGuideProviderR4B.java | Implemented count() method to expose IG count metric |
| matchbox-server/src/main/java/ch/ahdis/matchbox/packages/ImplementationGuideProviderR4.java | Implemented count() method to expose IG count metric |
| matchbox-server/src/main/java/ch/ahdis/matchbox/config/MatchboxJpaConfig.java | Updated to create and inject MatchboxEngineCache bean |
| matchbox-server/src/main/java/ca/uhn/fhir/jpa/starter/Application.java | Added MatchboxMetricsConfig to Spring configuration imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3bab91d to
ca6ea56
Compare
Member
Author
|
Memory consumption seems to have increased, I need to investigate. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.