Successfully implemented comprehensive monitoring and alerting infrastructure for the Meteor platform across all three stories of Epic 3: **Story 3.5: 核心业务指标监控 (Core Business Metrics Monitoring)** - Instrumented NestJS web backend with CloudWatch metrics integration using prom-client - Instrumented Go compute service with structured CloudWatch metrics reporting - Created comprehensive Terraform infrastructure from scratch with modular design - Built 5-row CloudWatch dashboard with application, error rate, business, and infrastructure metrics - Added proper error categorization and provider performance tracking **Story 3.6: 关键故障告警 (Critical System Alerts)** - Implemented SNS-based alerting infrastructure via Terraform - Created critical alarms for NestJS 5xx error rate (>1% threshold) - Created Go service processing failure rate alarm (>5% threshold) - Created SQS queue depth alarm (>1000 messages threshold) - Added actionable alarm descriptions with investigation guidance - Configured email notifications with manual confirmation workflow **Cross-cutting Infrastructure:** - Complete AWS infrastructure as code with Terraform (S3, SQS, CloudWatch, SNS, IAM, optional RDS/Fargate) - Structured logging implementation across all services (NestJS, Go, Rust) - Metrics collection following "Golden Four Signals" observability approach - Configurable thresholds and deployment-ready monitoring solution The platform now has production-grade observability with comprehensive metrics collection, centralized monitoring dashboards, and automated critical system alerting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
109 lines
3.2 KiB
JSON
109 lines
3.2 KiB
JSON
{
|
|
"name": "meteor-web-backend",
|
|
"version": "0.0.1",
|
|
"description": "",
|
|
"author": "",
|
|
"private": true,
|
|
"license": "UNLICENSED",
|
|
"scripts": {
|
|
"build": "nest build",
|
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"start": "nest start",
|
|
"start:dev": "nest start --watch",
|
|
"start:debug": "nest start --debug --watch",
|
|
"start:prod": "node dist/main",
|
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:cov": "jest --coverage",
|
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
"test:integration": "TEST_DATABASE_URL=postgresql://meteor_test:meteor_test_pass@localhost:5433/meteor_test jest --config ./test/jest-e2e.json --testPathPattern=integration",
|
|
"migrate:up": "node-pg-migrate up",
|
|
"migrate:down": "node-pg-migrate down",
|
|
"migrate:create": "node-pg-migrate create"
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-cloudwatch": "^3.859.0",
|
|
"@aws-sdk/client-s3": "^3.856.0",
|
|
"@aws-sdk/client-sqs": "^3.856.0",
|
|
"@nestjs/common": "^11.0.1",
|
|
"@nestjs/core": "^11.0.1",
|
|
"@nestjs/jwt": "^11.0.0",
|
|
"@nestjs/passport": "^11.0.5",
|
|
"@nestjs/platform-express": "^11.1.5",
|
|
"@nestjs/schedule": "^6.0.0",
|
|
"@nestjs/terminus": "^11.0.0",
|
|
"@nestjs/typeorm": "^11.0.0",
|
|
"@types/bcrypt": "^6.0.0",
|
|
"@types/passport-jwt": "^4.0.1",
|
|
"@types/passport-local": "^1.0.38",
|
|
"@types/pg": "^8.15.5",
|
|
"@types/uuid": "^10.0.0",
|
|
"bcrypt": "^6.0.0",
|
|
"class-transformer": "^0.5.1",
|
|
"class-validator": "^0.14.2",
|
|
"dotenv": "^17.2.1",
|
|
"multer": "^2.0.2",
|
|
"nestjs-pino": "^4.4.0",
|
|
"node-pg-migrate": "^8.0.3",
|
|
"passport": "^0.7.0",
|
|
"passport-jwt": "^4.0.1",
|
|
"passport-local": "^1.0.0",
|
|
"pg": "^8.16.3",
|
|
"pino": "^9.7.0",
|
|
"pino-http": "^10.5.0",
|
|
"prom-client": "^15.1.3",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.1",
|
|
"stripe": "^18.4.0",
|
|
"typeorm": "^0.3.25",
|
|
"uuid": "^11.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/eslintrc": "^3.2.0",
|
|
"@eslint/js": "^9.18.0",
|
|
"@nestjs/cli": "^11.0.0",
|
|
"@nestjs/schematics": "^11.0.0",
|
|
"@nestjs/testing": "^11.0.1",
|
|
"@swc/cli": "^0.6.0",
|
|
"@swc/core": "^1.10.7",
|
|
"@types/express": "^5.0.0",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/multer": "^2.0.0",
|
|
"@types/node": "^22.10.7",
|
|
"@types/supertest": "^6.0.2",
|
|
"eslint": "^9.18.0",
|
|
"eslint-config-prettier": "^10.0.1",
|
|
"eslint-plugin-prettier": "^5.2.2",
|
|
"globals": "^16.0.0",
|
|
"jest": "^29.7.0",
|
|
"prettier": "^3.4.2",
|
|
"source-map-support": "^0.5.21",
|
|
"supertest": "^7.0.0",
|
|
"ts-jest": "^29.2.5",
|
|
"ts-loader": "^9.5.2",
|
|
"ts-node": "^10.9.2",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"typescript": "^5.7.3",
|
|
"typescript-eslint": "^8.20.0"
|
|
},
|
|
"jest": {
|
|
"moduleFileExtensions": [
|
|
"js",
|
|
"json",
|
|
"ts"
|
|
],
|
|
"rootDir": "src",
|
|
"testRegex": ".*\\.spec\\.ts$",
|
|
"transform": {
|
|
"^.+\\.(t|j)s$": "ts-jest"
|
|
},
|
|
"collectCoverageFrom": [
|
|
"**/*.(t|j)s"
|
|
],
|
|
"coverageDirectory": "../coverage",
|
|
"testEnvironment": "node"
|
|
}
|
|
}
|