-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FINERACT-2438: Add Micrometer Observability to Reporting API #5348
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
Conversation
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kidnly see my comment
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
|
Squash and commit your changes please |
e7c4794 to
a2e3c06
Compare
|
@IOhacker I have squashed the changes into a single commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| management.info.git.mode=FULL | ||
| management.endpoints.web.exposure.include=${FINERACT_MANAGEMENT_ENDPOINT_WEB_EXPOSURE_INCLUDE:health,info,prometheus} | ||
|
|
||
| management.endpoints.web.exposure.include=${FINERACT_MANAGEMENT_ENDPOINT_WEB_EXPOSURE_INCLUDE:health,info,metrics,prometheus} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please dont change this configuration. Metrics are not exposed by default for a reason!
| management.endpoints.web.exposure.include=${FINERACT_MANAGEMENT_ENDPOINT_WEB_EXPOSURE_INCLUDE:health,info,prometheus} | ||
|
|
||
| management.endpoints.web.exposure.include=${FINERACT_MANAGEMENT_ENDPOINT_WEB_EXPOSURE_INCLUDE:health,info,metrics,prometheus} | ||
| management.endpoint.metrics.enabled=${FINERACT_MANAGEMENT_ENDPOINT_METRICS_ENABLED:false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think it is valid endpoint anymore, it was changed to be management.endpoints.web.exposure.include=metrics no?
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly see my concerns!
ec4fed4 to
263acb0
Compare
|
@adamsaghy Thanks for the detailed review. I have refactored the PR to align with your feedback:
The current @timed implementation aggregates all reports into one metric, which hides that granularity, but I agree this is the cleaner, standard starting point for the codebase. I am open to any suggestions/corrections if required |
0903594 to
fdd4ca3
Compare
|
@IOhacker I think I made a mistake while copying the license header at the top of the code file earlier, which I suspect made the code fail the check. I’ve corrected it now, and the build check should pass. |
Description
This PR aims to instrument the
RunreportsApiResourcewith the@Timedannotation to provide visibility into report generation performance.Currently, there is no specific metric isolating the Run Reports API execution time from general HTTP traffic. This change introduces a dedicated metric,
fineract.report.execution, to track the aggregate latency and throughput of the reporting subsystem.Key Changes
Annotation-based Metrics
Applied
@Timedto therunReportmethod inRunreportsApiResource.Infrastructure Configuration
Added
MetricsConfigto enable AOP support for the@Timedannotation by registeringTimedAspect.Clean Implementation
Utilized standard Spring Boot and Micrometer patterns, avoiding any additional boilerplate.
This establishes the necessary performance baseline to monitor the reporting module’s load and response times.
Verification
Validated locally by generating report traffic and querying the Actuator metrics endpoint.
Request
Response
{ "name": "fineract.report.execution", "description": "Time taken to execute reports", "baseUnit": "seconds", "measurements": [ { "statistic": "COUNT", "value": 1.0 }, { "statistic": "TOTAL_TIME", "value": 0.0114712 }, { "statistic": "MAX", "value": 0.0114712 } ], "availableTags": [ { "tag": "exception", "values": ["none"] }, { "tag": "component", "values": ["reporting"] }, { "tag": "method", "values": ["runReport"] }, { "tag": "class", "values": [ "org.apache.fineract.infrastructure.dataqueries.api.RunreportsApiResource" ] } ] }Checklist
Please make sure these boxes are checked before submitting your pull request — thanks!
fineract-provider/src/main/resources/static/legacy-docs/apiLive.htmif applicable.Your assigned reviewer(s) will follow our
guidelines for code reviews.