feat(EM-43): Set up centralized logging with ELK stack#59
Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
Open
Conversation
- Add infrastructure/logging/ with Docker Compose for ELK stack (Elasticsearch 8.13.0, Logstash 8.13.0, Kibana 8.13.0, Filebeat 8.13.0) - Create Logstash pipeline with JSON parsing, trace ID extraction - Add Elasticsearch index template and ILM policy (30d retention) - Create Kibana dashboard exports (service logs, error trends, trace correlation) - Create libs/ftgo-logging/ shared logging auto-configuration library - Implement structured JSON logging via custom FtgoJsonEncoder - Add trace ID correlation integrating with libs/ftgo-tracing/ via MDC - Add RequestIdFilter for X-Request-ID propagation - Add Logstash TCP appender configuration for direct log shipping - Include Logback XML fragment for declarative configuration - Add documentation under docs/logging/ 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-43): Set up centralized logging with ELK stack
Summary
Adds centralized logging infrastructure and a shared logging library for the FTGO microservices platform:
infrastructure/logging/: Docker Compose for full ELK stack (Elasticsearch 8.13.0, Logstash, Kibana, Filebeat), Logstash pipeline config with JSON parsing and trace ID extraction, Elasticsearch index template + ILM policy (30d retention), Kibana dashboard NDJSON exportslibs/ftgo-logging/: Spring Boot auto-configuration library providing structured JSON logging via a customFtgoJsonEncoder, Logstash TCP appender, request ID filter (X-Request-ID), and MDC-based trace/span ID correlation withlibs/ftgo-tracing/docs/logging/: Architecture documentation, configuration reference, and troubleshooting guideNo existing files were modified. The root
settings.gradleis untouched.Review & Testing Checklist for Human
FtgoJsonEncoder,LogbackJsonConfiguration, andLogstashAppenderConfigurationfor compilation issues.LogbackJsonConfiguration.configure()programmatically detaches and replaces the root logger's console appender at@PostConstructtime. This could cause log loss during startup or interfere with other logging configurations. Verify ordering doesn't conflict with Spring Boot's own Logback initialization.FtgoJsonEncoder(custom hand-rolled encoder) AND the declarativelogback-ftgo.xml(usingLogstashEncoderfrom logstash-logback-encoder). Confirm this is intentional and that usage guidance is clear enough, or consolidate to one approach.curl -X POST "http://localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@ftgo-service-logs-dashboard.ndjsondocker compose up -d, configure a service withftgo.logging.logstash.enabled=true, send a traced request, and confirm logs appear in Kibana withtraceId/spanIdfields populated.Notes
RequestIdFilteris registered as a plain bean; Spring Boot will auto-register it but ordering relative to tracing filters is not explicitly set.traceId/spanIdin MDC; this relies on Spring Boot's built-in MDC propagation from Micrometer tracing (should work withftgo-tracingon the classpath).Link to Devin run: https://app.devin.ai/sessions/7de731f3ee814f21b7b8818a5a8d208b
Requested by: @abj453demo