feat(EM-41): Upgrade Micrometer/Prometheus Metrics and Add Service-Level Dashboards#49
Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
Conversation
…s metrics and Grafana dashboards - Create libs/ftgo-observability/ shared library module - Configure Micrometer Prometheus registry auto-configuration - Add custom business metrics for order, consumer, courier, restaurant domains - Create Prometheus scrape configuration for each service - Create Grafana dashboard JSON templates for each service - Add health and metrics actuator endpoint configuration - Update gradle/libs.versions.toml with observability dependencies - Add unit tests for all metrics classes and auto-configuration Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
feat(EM-41): Add ftgo-observability library with Micrometer/Prometheus metrics and Grafana dashboards
Summary
Adds a new
libs/ftgo-observability/shared library module providing Micrometer 1.12.5 / Prometheus metrics auto-configuration, custom business metrics for each bounded context, Prometheus scrape configs, and Grafana dashboard templates. Also updatesgradle/libs.versions.tomlwith new observability-related dependency entries.Key components:
PrometheusMetricsAutoConfiguration(JVM/system metrics + common tags),BusinessMetricsAutoConfiguration(domain metrics beans),ActuatorEndpointConfigurationOrderMetrics,ConsumerMetrics,CourierMetrics,RestaurantMetrics— each with domain-specific counters, timers, gauges, and distribution summariesprometheus.ymlwith scrape targets for all 4 services; Grafana provisioning + 4 dashboard JSON templatesReview & Testing Checklist for Human
prometheus-simpleclient = "0.16.0"is added tolibs.versions.tomlbut never referenced by any library declaration.micrometer-tracing-bridge-otelis declared but not used by theobservabilitybundle or the module itself. Confirm these are intentional for future use or should be removed.build.gradle: The observability module hardcodes Spring Boot3.2.5, Micrometer1.12.5, etc. instead of using the version catalog (the module is standalone with its ownsettings.gradle). Verify this version-drift risk is acceptable or if the module should be restructured.ftgo-observability-defaults.propertiesis not auto-loaded: The file sits inMETA-INF/but Spring Boot does not automatically import arbitrary properties from that path. The actuator endpoint exposure defaults declared there will not take effect unless explicitly imported (e.g. via@PropertySourceorspring.config.import). Confirm whether this is a placeholder for future wiring or a bug.ActuatorEndpointConfiguration.ActuatorEndpointPropertiesis a no-op: This class is registered as a bean but isn't bound to any@ConfigurationPropertiesprefix, so it's just a POJO with default values that nothing reads. Verify if this is intentional scaffolding or should be removed.settings.gradle(per task requirements). Recommend adding the module to a service's dependencies and verifying the auto-configuration activates, metrics register correctly, and/actuator/prometheusendpoint works.Test Plan
implementation project(':libs:ftgo-observability')to a service (e.g.,order-service)/actuator/prometheusendpoint exposes metricsftgo_orders_created_total)prometheus.ymland verify scraping worksNotes
_totalsuffix for counters,_seconds_sum/_seconds_countfor timers)Link to Devin run: https://app.devin.ai/sessions/aa641feb90044c82b4402ccd951a06d2
Requested by: @abj453demo