- feat(logging): implement structured logging, metrics, and error mon…#69
Closed
Cedarich wants to merge 2 commits into
Closed
- feat(logging): implement structured logging, metrics, and error mon…#69Cedarich wants to merge 2 commits into
Cedarich wants to merge 2 commits into
Conversation
Contributor
Author
|
Please approve workflow |
Contributor
|
@Cedarich fix CI |
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.
Closes #44
Summary
Implement comprehensive logging and monitoring across the PropChain backend to improve observability, debuggability, and production readiness.
Changes
Implement structured logging with correlation and trace IDs
correlationIdandtraceIdx-correlation-idandx-trace-idheaders inLoggingMiddlewareStructuredLoggerServiceAdd log aggregation, centralization, and rotation
maxFiles,maxSize, zipped archives)Implement performance monitoring and metrics
MetricsServiceto track HTTP request counts, durations, and status codesLoggingInterceptorGET /health/metricsfor metrics snapshotAdd error tracking and alerting hooks
ErrorMonitoringServiceas a central place to capture exceptionsAllExceptionsFilterto:Implement lightweight distributed tracing
traceIdalongsidecorrelationIdin the CLS namespacex-correlation-idandx-trace-idto outbound valuation API callsIntegrate logging and monitoring globally
LoggingModuleglobal and export logger/metrics/error-monitoring servicesLoggingInterceptorandAllExceptionsFilteras global providersStructuredLoggerServiceas the Nest logger inmain.tsAcceptance Criteria Mapping
Notes
npm run lintpasses (TypeScript version warning only).npm run test:unitcurrently fails due to Jest coverageThreshold JSON parsing (pre-existing quoting issue on Windows).close issue #44