-
Notifications
You must be signed in to change notification settings - Fork 194
[backend] feat: adding spring actuator to collect metrics (#4438) #4585
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
base: release/current
Are you sure you want to change the base?
Conversation
|
suggestion : I think we should add commented code in AppSecurityConfig.java that allows calls to /actuator/ so that it's easier for people to understand what they need to activate if they want the metrics working. Wdyt ? |
That is working for me as it is without any modification to AppSecurityConfig |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/current #4585 +/- ##
=====================================================
+ Coverage 52.74% 52.78% +0.04%
- Complexity 4119 4122 +3
=====================================================
Files 963 963
Lines 28942 28944 +2
Branches 2152 2152
=====================================================
+ Hits 15265 15279 +14
+ Misses 12779 12769 -10
+ Partials 898 896 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I actually added the code in AppSecurityConfig to only allow metrics api to authenticated users |
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.
Pull request overview
This PR adds Spring Boot Actuator integration to OpenAEV for collecting metrics during performance testing. The actuator endpoints are disabled by default for security but can be enabled via configuration for test instances.
Key Changes:
- Added Spring Boot Actuator and Micrometer Prometheus dependencies
- Configured actuator endpoints (disabled by default, with commented example for enabling metrics/prometheus)
- Secured actuator endpoints with authentication requirement
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| openaev-api/pom.xml | Added spring-boot-starter-actuator and micrometer-registry-prometheus dependencies |
| openaev-api/src/main/resources/application.properties | Added actuator configuration properties with endpoints disabled by default |
| openaev-api/src/main/java/io/openaev/config/AppSecurityConfig.java | Added authentication requirement for /actuator/** endpoints |
| management.endpoint.health.show-details=always | ||
| management.server.port=8080 |
Copilot
AI
Jan 9, 2026
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.
The management.server.port is set to 8080, which is likely the same port as the main application server. This will cause a port conflict when the actuator endpoints are enabled. Consider using a different port (e.g., 8081) for the management server or remove this property to use the same port as the main application without creating a separate management server.
| management.endpoint.health.show-details=always | |
| management.server.port=8080 | |
| management.endpoint.health.show-details=always |
| #remediation.detection.webservice.retry.waiting.milliseconds= | ||
|
|
||
|
|
||
| # Enable actuator -> disabled by default |
Copilot
AI
Jan 9, 2026
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.
The empty value for management.endpoints.web.exposure.include could be unclear to users. Consider adding a comment explaining that an empty value disables all endpoints, or explicitly set it to 'none' for clarity.
| # Enable actuator -> disabled by default | |
| # Enable actuator -> disabled by default | |
| # Leaving this value empty disables exposure of all actuator endpoints. |
Proposed changes
Testing Instructions
Related issues
Checklist