Skip to content

Setup k8s manifests#112

Open
Obiajulu-gif wants to merge 2 commits intoMissBlue00:mainfrom
Obiajulu-gif:setup_k8s_manifests
Open

Setup k8s manifests#112
Obiajulu-gif wants to merge 2 commits intoMissBlue00:mainfrom
Obiajulu-gif:setup_k8s_manifests

Conversation

@Obiajulu-gif
Copy link
Copy Markdown

This pull request introduces a comprehensive observability and structured logging system to the stellar-pay API service. It adds structured JSON logging with correlation IDs, integrates logging and request context throughout the API, and provides CloudWatch dashboard assets for production monitoring. The changes also include middleware, interceptors, and exception filters to ensure consistent logging and traceability across requests and errors.

Observability and Logging Enhancements:

  • Introduced a structured JSON logger (StructuredLogger) with support for log levels, correlation IDs, and child loggers for contextual logging. Added a test suite for logger behavior. (apps/api/src/observability/logger.ts, apps/api/src/observability/logger.spec.ts) [1] [2]
  • Implemented request context propagation using AsyncLocalStorage, with middleware to generate and attach correlation IDs to each request. (apps/api/src/observability/request-context.ts, apps/api/src/observability/request-context.middleware.ts) [1] [2]
  • Added a global request logging interceptor and an exception filter to log all HTTP requests and unhandled exceptions with structured payloads. (apps/api/src/observability/request-logging.interceptor.ts, apps/api/src/observability/logging-exception.filter.ts) [1] [2]
  • Integrated the logger and request context middleware into the NestJS application bootstrap and module configuration, ensuring all routes benefit from observability features. (apps/api/src/app.module.ts, apps/api/src/main.ts, apps/api/src/observability/index.ts) [1] [2] [3] [4] [5]

Application Logging Integration:

  • Added contextual logging to key controllers and services (AppController, AppService, HealthController, TreasuryController, TreasuryService) to emit structured events for important actions and API endpoints. (apps/api/src/app.controller.ts, apps/api/src/app.service.ts, apps/api/src/health/health.controller.ts, apps/api/src/treasury/treasury.controller.ts, apps/api/src/treasury/treasury.service.ts) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Documentation and Configuration:

  • Updated documentation to describe observability features and how to deploy CloudWatch dashboards and alarms. (stellar-pay/README.md)
  • Added environment variable examples for log level and CloudWatch integration. (apps/api/.env.example)

These changes significantly improve the API's observability, making it easier to trace requests, debug issues, and monitor production health.

Closes #93

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

@Obiajulu-gif is attempting to deploy a commit to the missblue00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 24, 2026

@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@MissBlue00
Copy link
Copy Markdown
Owner

@Obiajulu-gif the ci/cd checks failed and there are merge conflicts, please resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up Kubernetes deployment manifests

2 participants