docs(EM-49): Define Logging Standards and Structured Logging Configuration#62
Open
devin-ai-integration[bot] wants to merge 2 commits intofeat/microservices-migration-v2from
Conversation
…ation templates - Create docs/logging-standards/ with comprehensive logging standards - Define log level guidelines per environment (dev, staging, prod) - Document MDC field standards and lifecycle management - Define JSON log format schema with required/optional fields - Document log aggregation patterns and Kibana search queries - Create Logback configuration templates for dev, staging, prod, test - Build on libs/ftgo-logging (EM-43) and libs/ftgo-tracing (EM-42) 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:
|
- Fix stray ] in traceId example in json-format.md - Remove unused SERVICE_NAME springProperty from dev/staging/prod templates - Add clarifying note for Kafka consumer MDC exception to traceId rule Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
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.
Summary
Adds logging standards documentation under
docs/logging-standards/and environment-specific Logback configuration templates underconfig/logback/. These complement (not duplicate) the existingdocs/logging/README.mdarchitecture overview and build onlibs/ftgo-logging(EM-43) andlibs/ftgo-tracing(EM-42).Documentation (
docs/logging-standards/):README.md— index, quick start, integration diagramlog-levels.md— per-environment log level matrix (dev/staging/prod), level usage guidelines, anti-patterns, sensitive data rulesjson-format.md— canonical JSON schema with required/optional fields, Elasticsearch field mappingmdc-standards.md— standard and custom MDC fields, lifecycle management, async propagation patterns (TaskDecorator, CompletableFuture, Kafka)log-aggregation.md— KQL query patterns, debugging workflows, Elasticsearch Query DSL examples, alerting thresholdsLogback Templates (
config/logback/):logback-spring-dev.xml— plain-text colored console, DEBUG root, verbose SQL/framework logginglogback-spring-staging.xml— JSON console + Logstash TCP, INFO rootlogback-spring-prod.xml— JSON console + Logstash TCP, INFO root, conservative framework levelslogback-spring-test.xml— plain-text console, WARN root, no ftgo-logging dependencyNo existing files modified. Documentation and config-template-only change.
Updates Since Last Revision
Addressed issues flagged in initial review:
]character injson-format.mdtraceId example valueSERVICE_NAMEspringPropertyfrom dev, staging, and prod templates (the includedlogback-ftgo.xmlfragment uses its ownFTGO_SERVICE_NAMEproperty)mdc-standards.mdKafka consumer section explaining why manually settingtraceIdis acceptable there (no HTTP request context for the tracing library to instrument)Review & Testing Checklist for Human
defaultprofile:logback-spring-dev.xmluses<springProfile name="dev,local,default">— this means DEBUG-level logging fires when no Spring profile is set. Confirm this is the desired team behavior or ifdefaultshould be removed.libs/ftgo-loggingandlibs/ftgo-tracingcode — worth a quick scan to confirm alignment with actual library behavior.Suggested test plan:
config/logback/logback-spring-dev.xmlto a service'ssrc/main/resources/logback-spring.xmlspring.profiles.active=devspring.profiles.active=prodto verify JSON outputNotes
Requested by: @abj453demo
Link to Devin run